Matthew Finkel pushed to branch tor-browser-89.1.1-10.5-1 at The Tor Project / Applications / fenix
Commits:
-
416bcf65
by Matthew Finkel at 2021-06-15T14:34:24+00:00
-
dca9b30b
by Matthew Finkel at 2021-06-15T14:34:27+00:00
3 changed files:
- app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt
- app/src/main/java/org/mozilla/fenix/tabstray/TabLayoutMediator.kt
- app/src/main/res/layout/component_tabstray2.xml
Changes:
... | ... | @@ -472,13 +472,13 @@ open class DefaultToolbarMenu( |
472 | 472 |
onItemTapped.invoke(ToolbarMenu.Item.AddToTopSites)
|
473 | 473 |
}
|
474 | 474 |
|
475 |
- val saveToCollectionItem = BrowserMenuImageText(
|
|
476 |
- label = context.getString(R.string.browser_menu_save_to_collection_2),
|
|
477 |
- imageResource = R.drawable.ic_tab_collection,
|
|
478 |
- iconTintColorResource = primaryTextColor()
|
|
479 |
- ) {
|
|
480 |
- onItemTapped.invoke(ToolbarMenu.Item.SaveToCollection)
|
|
481 |
- }
|
|
475 |
+ //val saveToCollectionItem = BrowserMenuImageText(
|
|
476 |
+ // label = context.getString(R.string.browser_menu_save_to_collection_2),
|
|
477 |
+ // imageResource = R.drawable.ic_tab_collection,
|
|
478 |
+ // iconTintColorResource = primaryTextColor()
|
|
479 |
+ //) {
|
|
480 |
+ // onItemTapped.invoke(ToolbarMenu.Item.SaveToCollection)
|
|
481 |
+ //}
|
|
482 | 482 |
|
483 | 483 |
val settingsItem = BrowserMenuHighlightableItem(
|
484 | 484 |
label = context.getString(R.string.browser_menu_settings),
|
... | ... | @@ -575,7 +575,7 @@ open class DefaultToolbarMenu( |
575 | 575 |
//addToHomeScreenItem.apply { visible = ::canAddToHomescreen },
|
576 | 576 |
//installToHomescreen.apply { visible = ::canInstall },
|
577 | 577 |
addToTopSitesItem,
|
578 |
- saveToCollectionItem,
|
|
578 |
+ //saveToCollectionItem,
|
|
579 | 579 |
BrowserMenuDivider(),
|
580 | 580 |
settingsItem,
|
581 | 581 |
if (shouldDeleteDataOnQuit) deleteDataOnQuit else null,
|
... | ... | @@ -4,7 +4,9 @@ |
4 | 4 |
|
5 | 5 |
package org.mozilla.fenix.tabstray
|
6 | 6 |
|
7 |
+import android.view.View
|
|
7 | 8 |
import androidx.annotation.VisibleForTesting
|
9 |
+import androidx.core.view.isGone
|
|
8 | 10 |
import com.google.android.material.tabs.TabLayout
|
9 | 11 |
import mozilla.components.browser.state.store.BrowserStore
|
10 | 12 |
import mozilla.components.support.base.feature.LifecycleAwareFeature
|
... | ... | @@ -36,6 +38,15 @@ class TabLayoutMediator( |
36 | 38 |
tabLayout.addOnTabSelectedListener(observer)
|
37 | 39 |
|
38 | 40 |
selectActivePage()
|
41 |
+ |
|
42 |
+ // Find normal mode tabs and set visibility
|
|
43 |
+ tabLayout.getTabAt(POSITION_NORMAL_TABS)?.getCustomView()?.apply {
|
|
44 |
+ // The View we get from getCustomView() is only a sub-component
|
|
45 |
+ // of the actual tab (for example, the tab-count box). We need
|
|
46 |
+ // the "Custom View"'s parent for controlling the visibility
|
|
47 |
+ // of the entire tab.
|
|
48 |
+ (getParent() as? View)?.isGone = true
|
|
49 |
+ }
|
|
39 | 50 |
}
|
40 | 51 |
|
41 | 52 |
override fun stop() {
|
... | ... | @@ -101,14 +101,6 @@ |
101 | 101 |
android:contentDescription="@string/tabs_header_private_tabs_title"
|
102 | 102 |
android:icon="@drawable/ic_private_browsing" />
|
103 | 103 |
|
104 |
- <com.google.android.material.tabs.TabItem
|
|
105 |
- android:id="@+id/synced_tab_item"
|
|
106 |
- android:layout_width="0dp"
|
|
107 |
- android:layout_height="match_parent"
|
|
108 |
- android:contentDescription="@string/tabs_header_synced_tabs_title"
|
|
109 |
- android:foregroundTint="@color/photonWhite"
|
|
110 |
- android:icon="@drawable/ic_synced_tabs" />
|
|
111 |
- |
|
112 | 104 |
</com.google.android.material.tabs.TabLayout>
|
113 | 105 |
|
114 | 106 |
<ImageButton
|