|
|
@ -59,6 +59,7 @@ import org.mozilla.fenix.theme.Theme
|
|
|
|
* @param onRecentSyncedTabClick Invoked when the user clicks on the recent synced tab.
|
|
|
|
* @param onRecentSyncedTabClick Invoked when the user clicks on the recent synced tab.
|
|
|
|
* @param onSeeAllSyncedTabsButtonClick Invoked when user clicks on the "See all" button in the synced tab card.
|
|
|
|
* @param onSeeAllSyncedTabsButtonClick Invoked when user clicks on the "See all" button in the synced tab card.
|
|
|
|
* @param onRemoveSyncedTab Invoked when user clicks on the "Remove" dropdown menu option.
|
|
|
|
* @param onRemoveSyncedTab Invoked when user clicks on the "Remove" dropdown menu option.
|
|
|
|
|
|
|
|
* @param onRecentSyncedTabLongClick Invoked when user long presses the recent synced tab.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@OptIn(ExperimentalFoundationApi::class)
|
|
|
|
@OptIn(ExperimentalFoundationApi::class)
|
|
|
|
@Suppress("LongMethod")
|
|
|
|
@Suppress("LongMethod")
|
|
|
@ -68,6 +69,7 @@ fun RecentSyncedTab(
|
|
|
|
onRecentSyncedTabClick: (RecentSyncedTab) -> Unit,
|
|
|
|
onRecentSyncedTabClick: (RecentSyncedTab) -> Unit,
|
|
|
|
onSeeAllSyncedTabsButtonClick: () -> Unit,
|
|
|
|
onSeeAllSyncedTabsButtonClick: () -> Unit,
|
|
|
|
onRemoveSyncedTab: (RecentSyncedTab) -> Unit,
|
|
|
|
onRemoveSyncedTab: (RecentSyncedTab) -> Unit,
|
|
|
|
|
|
|
|
onRecentSyncedTabLongClick: () -> Unit,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
var isDropdownExpanded by remember { mutableStateOf(false) }
|
|
|
|
var isDropdownExpanded by remember { mutableStateOf(false) }
|
|
|
|
|
|
|
|
|
|
|
@ -82,7 +84,10 @@ fun RecentSyncedTab(
|
|
|
|
.height(180.dp)
|
|
|
|
.height(180.dp)
|
|
|
|
.combinedClickable(
|
|
|
|
.combinedClickable(
|
|
|
|
onClick = { tab?.let { onRecentSyncedTabClick(tab) } },
|
|
|
|
onClick = { tab?.let { onRecentSyncedTabClick(tab) } },
|
|
|
|
onLongClick = { isDropdownExpanded = true },
|
|
|
|
onLongClick = {
|
|
|
|
|
|
|
|
onRecentSyncedTabLongClick()
|
|
|
|
|
|
|
|
isDropdownExpanded = true
|
|
|
|
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
shape = RoundedCornerShape(8.dp),
|
|
|
|
shape = RoundedCornerShape(8.dp),
|
|
|
|
backgroundColor = FirefoxTheme.colors.layer2,
|
|
|
|
backgroundColor = FirefoxTheme.colors.layer2,
|
|
|
@ -285,6 +290,7 @@ private fun LoadedRecentSyncedTab() {
|
|
|
|
onRecentSyncedTabClick = {},
|
|
|
|
onRecentSyncedTabClick = {},
|
|
|
|
onSeeAllSyncedTabsButtonClick = {},
|
|
|
|
onSeeAllSyncedTabsButtonClick = {},
|
|
|
|
onRemoveSyncedTab = {},
|
|
|
|
onRemoveSyncedTab = {},
|
|
|
|
|
|
|
|
onRecentSyncedTabLongClick = {},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -298,6 +304,7 @@ private fun LoadingRecentSyncedTab() {
|
|
|
|
onRecentSyncedTabClick = {},
|
|
|
|
onRecentSyncedTabClick = {},
|
|
|
|
onSeeAllSyncedTabsButtonClick = {},
|
|
|
|
onSeeAllSyncedTabsButtonClick = {},
|
|
|
|
onRemoveSyncedTab = {},
|
|
|
|
onRemoveSyncedTab = {},
|
|
|
|
|
|
|
|
onRecentSyncedTabLongClick = {},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|