File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change 2626import com .igalia .wolvic .ui .widgets .UIWidget ;
2727import com .igalia .wolvic .ui .widgets .WidgetManagerDelegate ;
2828import com .igalia .wolvic .ui .widgets .WidgetPlacement ;
29+ import com .igalia .wolvic .ui .widgets .Windows ;
2930import com .igalia .wolvic .utils .AnimationHelper ;
3031import com .igalia .wolvic .utils .ViewUtils ;
3132
@@ -297,17 +298,19 @@ private void updateItems() {
297298 mItems .add (item );
298299 }
299300
300- mItems .add (new HamburgerMenuAdapter .MenuItem .Builder (
301- HamburgerMenuAdapter .MenuItem .TYPE_DEFAULT ,
302- (menuItem ) -> {
303- if (mDelegate != null ) {
304- mDelegate .onFindInPage ();
305- }
306- return null ;
307- })
308- .withTitle (getContext ().getString (R .string .hamburger_menu_find_in_page ))
309- .withIcon (R .drawable .ic_icon_search )
310- .build ());
301+ if (mWidgetManager .getFocusedWindow ().getCurrentContentType () == Windows .ContentType .WEB_CONTENT ) {
302+ mItems .add (new HamburgerMenuAdapter .MenuItem .Builder (
303+ HamburgerMenuAdapter .MenuItem .TYPE_DEFAULT ,
304+ (menuItem ) -> {
305+ if (mDelegate != null ) {
306+ mDelegate .onFindInPage ();
307+ }
308+ return null ;
309+ })
310+ .withTitle (getContext ().getString (R .string .hamburger_menu_find_in_page ))
311+ .withIcon (R .drawable .ic_icon_search )
312+ .build ());
313+ }
311314
312315 mItems .add (new HamburgerMenuAdapter .MenuItem .Builder (
313316 HamburgerMenuAdapter .MenuItem .TYPE_DEFAULT ,
You can’t perform that action at this time.
0 commit comments