|
|
@ -65,6 +65,7 @@ private val ICON_SIZE = 24.dp
|
|
|
|
* multi select banner.
|
|
|
|
* multi select banner.
|
|
|
|
* @param onSaveToCollectionClick Invoked when the user clicks on the save to collection button from
|
|
|
|
* @param onSaveToCollectionClick Invoked when the user clicks on the save to collection button from
|
|
|
|
* the multi select banner.
|
|
|
|
* the multi select banner.
|
|
|
|
|
|
|
|
* @param onShareSelectedTabsClick Invoked when the user clicks on the share button from the multi select banner.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Suppress("LongParameterList")
|
|
|
|
@Suppress("LongParameterList")
|
|
|
|
@Composable
|
|
|
|
@Composable
|
|
|
@ -76,6 +77,7 @@ fun TabsTrayBanner(
|
|
|
|
onTabPageIndicatorClicked: (Page) -> Unit,
|
|
|
|
onTabPageIndicatorClicked: (Page) -> Unit,
|
|
|
|
onExitSelectModeClick: () -> Unit,
|
|
|
|
onExitSelectModeClick: () -> Unit,
|
|
|
|
onSaveToCollectionClick: () -> Unit,
|
|
|
|
onSaveToCollectionClick: () -> Unit,
|
|
|
|
|
|
|
|
onShareSelectedTabsClick: () -> Unit,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
if (selectMode is TabsTrayState.Mode.Select) {
|
|
|
|
if (selectMode is TabsTrayState.Mode.Select) {
|
|
|
|
MultiSelectBanner(
|
|
|
|
MultiSelectBanner(
|
|
|
@ -83,6 +85,7 @@ fun TabsTrayBanner(
|
|
|
|
shouldShowInactiveButton = isInDebugMode,
|
|
|
|
shouldShowInactiveButton = isInDebugMode,
|
|
|
|
onExitSelectModeClick = onExitSelectModeClick,
|
|
|
|
onExitSelectModeClick = onExitSelectModeClick,
|
|
|
|
onSaveToCollectionsClick = onSaveToCollectionClick,
|
|
|
|
onSaveToCollectionsClick = onSaveToCollectionClick,
|
|
|
|
|
|
|
|
onShareSelectedTabs = onShareSelectedTabsClick,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
SingleSelectBanner(
|
|
|
|
SingleSelectBanner(
|
|
|
@ -227,6 +230,7 @@ private fun NormalTabsTabIcon(normalTabCount: Int) {
|
|
|
|
* @param shouldShowInactiveButton Whether or not to show the inactive tabs menu item.
|
|
|
|
* @param shouldShowInactiveButton Whether or not to show the inactive tabs menu item.
|
|
|
|
* @param onExitSelectModeClick Invoked when the user clicks on exit select mode button.
|
|
|
|
* @param onExitSelectModeClick Invoked when the user clicks on exit select mode button.
|
|
|
|
* @param onSaveToCollectionsClick Invoked when the user clicks on the save to collection button.
|
|
|
|
* @param onSaveToCollectionsClick Invoked when the user clicks on the save to collection button.
|
|
|
|
|
|
|
|
* @param onShareSelectedTabs Invoked when the user clicks on the share button.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Suppress("LongMethod")
|
|
|
|
@Suppress("LongMethod")
|
|
|
|
@Composable
|
|
|
|
@Composable
|
|
|
@ -235,6 +239,7 @@ private fun MultiSelectBanner(
|
|
|
|
shouldShowInactiveButton: Boolean,
|
|
|
|
shouldShowInactiveButton: Boolean,
|
|
|
|
onExitSelectModeClick: () -> Unit,
|
|
|
|
onExitSelectModeClick: () -> Unit,
|
|
|
|
onSaveToCollectionsClick: () -> Unit,
|
|
|
|
onSaveToCollectionsClick: () -> Unit,
|
|
|
|
|
|
|
|
onShareSelectedTabs: () -> Unit,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
var showMenu by remember { mutableStateOf(false) }
|
|
|
|
var showMenu by remember { mutableStateOf(false) }
|
|
|
|
val menuItems = mutableListOf(
|
|
|
|
val menuItems = mutableListOf(
|
|
|
@ -288,7 +293,7 @@ private fun MultiSelectBanner(
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
IconButton(onClick = {}) {
|
|
|
|
IconButton(onClick = onShareSelectedTabs) {
|
|
|
|
Icon(
|
|
|
|
Icon(
|
|
|
|
painter = painterResource(id = R.drawable.ic_share),
|
|
|
|
painter = painterResource(id = R.drawable.ic_share),
|
|
|
|
contentDescription = stringResource(
|
|
|
|
contentDescription = stringResource(
|
|
|
@ -376,6 +381,7 @@ private fun TabsTrayBannerPreviewRoot(
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onExitSelectModeClick = { selectModeState = TabsTrayState.Mode.Normal },
|
|
|
|
onExitSelectModeClick = { selectModeState = TabsTrayState.Mode.Normal },
|
|
|
|
onSaveToCollectionClick = {},
|
|
|
|
onSaveToCollectionClick = {},
|
|
|
|
|
|
|
|
onShareSelectedTabsClick = {},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|