Commit 125acff9 authored by bauerb's avatar bauerb Committed by Commit bot

Correctly hide the content suggestions menu item by default.

Setting android:visible="false" only seems to work on groups,
not individual items.

Review-Url: https://codereview.chromium.org/2621203004
Cr-Commit-Position: refs/heads/master@{#442950}
parent 56eb36cf
...@@ -71,8 +71,7 @@ ...@@ -71,8 +71,7 @@
<item android:id="@+id/enter_vr_id" <item android:id="@+id/enter_vr_id"
android:title="@string/enter_vr" /> android:title="@string/enter_vr" />
<item android:id="@+id/content_suggestions_standalone_ui" <item android:id="@+id/content_suggestions_standalone_ui"
android:title="@null" android:title="@null" />
android:visible="false" />
</group> </group>
<!-- Items shown only in the tab switcher --> <!-- Items shown only in the tab switcher -->
......
...@@ -192,11 +192,10 @@ public class AppMenuPropertiesDelegate { ...@@ -192,11 +192,10 @@ public class AppMenuPropertiesDelegate {
// Only display the standalone content suggestions UI if the corresponding feature // Only display the standalone content suggestions UI if the corresponding feature
// is enabled. // is enabled.
if (ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SUGGESTIONS_STANDALONE_UI)) { MenuItem item = menu.findItem(R.id.content_suggestions_standalone_ui);
MenuItem item = menu.findItem(R.id.content_suggestions_standalone_ui); item.setTitle("🔰🆕👌");
item.setTitle("🔰🆕👌"); item.setVisible(
item.setVisible(true); ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SUGGESTIONS_STANDALONE_UI));
}
} }
if (isOverviewMenu) { if (isOverviewMenu) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment