diff --git a/.github/nightly-notes/2026-11-16-feat-profile-top-bar.md b/.github/nightly-notes/2026-11-16-feat-profile-top-bar.md new file mode 100644 index 0000000000..adf1630142 --- /dev/null +++ b/.github/nightly-notes/2026-11-16-feat-profile-top-bar.md @@ -0,0 +1,2 @@ +## New +- The profile button shows on every main tab, and Settings can move into its menu diff --git a/app/src/androidTest/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBarTest.kt b/app/src/androidTest/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBarTest.kt index 72ba4c4f40..8b145266cb 100644 --- a/app/src/androidTest/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBarTest.kt +++ b/app/src/androidTest/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBarTest.kt @@ -1,11 +1,17 @@ package io.github.aedev.flow.ui.components.layout.topbar +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.size import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.semantics import androidx.compose.ui.test.assertIsDisplayed import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.onNodeWithContentDescription import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.unit.dp import androidx.test.platform.app.InstrumentationRegistry import io.github.aedev.flow.R import kotlinx.coroutines.flow.MutableStateFlow @@ -24,14 +30,19 @@ class FlowTopBarTest { private fun setBar( unread: Int = 0, + account: TopBarAccountSettings = TopBarAccountSettings(showProfile = true, settingsInProfileMenu = false), content: @Composable () -> Unit, ) { composeRule.setContent { MaterialTheme { ProvideFlowGlobalActions( unreadNotifications = MutableStateFlow(unread), + account = MutableStateFlow(account), onOpenNotifications = {}, onOpenSettings = {}, + profileAction = { withSettings -> + Box(Modifier.size(48.dp).semantics { contentDescription = if (withSettings) PROFILE_WITH_SETTINGS else PROFILE }) + }, content = content, ) } @@ -50,6 +61,36 @@ class FlowTopBarTest { .assertIsDisplayed() } + @Test + fun rootDestinationShowsTheProfileAfterSettings() { + setBar { FlowTopBar(title = "Library") } + + composeRule.onNodeWithContentDescription(PROFILE).assertIsDisplayed() + } + + @Test + fun crowdedBarFoldsSettingsIntoTheProfile() { + setBar { FlowTopBar(title = "Subscriptions", crowded = true) } + + composeRule.onNodeWithContentDescription(PROFILE_WITH_SETTINGS).assertIsDisplayed() + composeRule + .onNodeWithContentDescription(context.getString(R.string.settings)) + .assertDoesNotExist() + } + + @Test + fun hiddenProfileKeepsSettingsEvenOnACrowdedBar() { + setBar(account = TopBarAccountSettings(showProfile = false, settingsInProfileMenu = true)) { + FlowTopBar(title = "Subscriptions", crowded = true) + } + + composeRule + .onNodeWithContentDescription(context.getString(R.string.settings)) + .assertIsDisplayed() + composeRule.onNodeWithContentDescription(PROFILE).assertDoesNotExist() + composeRule.onNodeWithContentDescription(PROFILE_WITH_SETTINGS).assertDoesNotExist() + } + @Test fun detailDestinationShowsNeitherShellAction() { setBar { FlowTopBar(title = "Buffer", onBack = {}) } @@ -97,4 +138,9 @@ class FlowTopBarTest { .onNodeWithContentDescription(context.getString(R.string.settings)) .assertDoesNotExist() } + + private companion object { + const val PROFILE = "profile" + const val PROFILE_WITH_SETTINGS = "profile with settings" + } } diff --git a/app/src/main/java/io/github/aedev/flow/data/local/PlayerPreferences.kt b/app/src/main/java/io/github/aedev/flow/data/local/PlayerPreferences.kt index 75f7dc3354..5ed91ad3e7 100644 --- a/app/src/main/java/io/github/aedev/flow/data/local/PlayerPreferences.kt +++ b/app/src/main/java/io/github/aedev/flow/data/local/PlayerPreferences.kt @@ -397,6 +397,8 @@ class PlayerPreferences( // Show app logo icon in home screen top bar val SHOW_APP_LOGO_ICON = booleanPreferencesKey("show_app_logo_icon") + val SHOW_PROFILE_IN_TOP_BAR = booleanPreferencesKey("show_profile_in_top_bar") + val SETTINGS_IN_PROFILE_MENU = booleanPreferencesKey("settings_in_profile_menu") // Player comments preview val COMMENTS_ENABLED = booleanPreferencesKey("comments_enabled") @@ -4286,6 +4288,26 @@ class PlayerPreferences( } } + val showProfileInTopBar: Flow = + context.playerPreferencesDataStore.data + .map { preferences -> preferences[Keys.SHOW_PROFILE_IN_TOP_BAR] ?: true } + + suspend fun setShowProfileInTopBar(enabled: Boolean) { + context.playerPreferencesDataStore.edit { preferences -> + preferences[Keys.SHOW_PROFILE_IN_TOP_BAR] = enabled + } + } + + val settingsInProfileMenu: Flow = + context.playerPreferencesDataStore.data + .map { preferences -> preferences[Keys.SETTINGS_IN_PROFILE_MENU] ?: false } + + suspend fun setSettingsInProfileMenu(enabled: Boolean) { + context.playerPreferencesDataStore.edit { preferences -> + preferences[Keys.SETTINGS_IN_PROFILE_MENU] = enabled + } + } + // Screen-level view mode toggles val searchIsGridMode: Flow = context.playerPreferencesDataStore.data diff --git a/app/src/main/java/io/github/aedev/flow/ui/FlowApp.kt b/app/src/main/java/io/github/aedev/flow/ui/FlowApp.kt index 7d803cc633..17b5bac17f 100644 --- a/app/src/main/java/io/github/aedev/flow/ui/FlowApp.kt +++ b/app/src/main/java/io/github/aedev/flow/ui/FlowApp.kt @@ -53,6 +53,9 @@ import io.github.aedev.flow.ui.components.music.common.ProvideMusicPlaybackState import io.github.aedev.flow.ui.components.music.sheet.LocalMusicMenus import io.github.aedev.flow.ui.components.music.sheet.rememberMusicMenus import io.github.aedev.flow.ui.components.musicplayer.sheet.rememberMusicPlayerSheetState +import io.github.aedev.flow.ui.components.profiles.ProfileSwitchViewModel +import io.github.aedev.flow.ui.components.profiles.ProfileTopBarAction +import io.github.aedev.flow.ui.components.profiles.SwitchRefusals import io.github.aedev.flow.ui.components.settings.SettingsDestination import io.github.aedev.flow.ui.components.settings.SettingsTarget import io.github.aedev.flow.ui.components.shared.FlowLoadingIndicator @@ -105,6 +108,8 @@ fun FlowApp( // Activity-scoped so the unread badge has exactly one collector for the whole shell. val notificationViewModel: NotificationViewModel = hiltViewModel(activity) val equalizerViewModel: EqualizerViewModel = hiltViewModel(activity) + // One for every root top bar's profile avatar, rather than one per back stack entry. + val profileSwitchViewModel: ProfileSwitchViewModel = hiltViewModel(activity) val playerUiStateResult = playerViewModel.uiState.collectAsStateWithLifecycle() val playerUiState by playerUiStateResult @@ -442,8 +447,17 @@ fun FlowApp( ProvideFlowGlobalActions( unreadNotifications = notificationViewModel.unreadCount, + account = profileSwitchViewModel.topBarAccount, onOpenNotifications = { navController.navigate("notifications") }, onOpenSettings = { navController.navigate("settings") }, + profileAction = { withSettings -> + ProfileTopBarAction( + withSettings = withSettings, + onOpenSettings = { navController.navigate("settings") }, + onOpenSettingsPage = mediaNavigator::openSettings, + viewModel = profileSwitchViewModel, + ) + }, ) { CompositionLocalProvider( *mediaNavigationLocals(mediaNavigator), @@ -456,6 +470,7 @@ fun FlowApp( ) { if (needsOnboarding == false) SubscriptionBellAlerts(snackbarHostState) LinkedSyncAlerts(snackbarHostState) + SwitchRefusals(profileSwitchViewModel) PlayOnHost(onManageDevices = { mediaNavigator.openSettings(SettingsTarget(SettingsDestination.SYNC)) }) NavHost( navController = navController, diff --git a/app/src/main/java/io/github/aedev/flow/ui/FlowNavigation.kt b/app/src/main/java/io/github/aedev/flow/ui/FlowNavigation.kt index e562757728..bbccc8f44d 100644 --- a/app/src/main/java/io/github/aedev/flow/ui/FlowNavigation.kt +++ b/app/src/main/java/io/github/aedev/flow/ui/FlowNavigation.kt @@ -107,7 +107,6 @@ fun NavGraphBuilder.flowAppGraph( // With a Search tab in the bar, the icon opens that tab, so Search keeps its state like any other tab. if (searchIsTab()) navController.navigateToTab(FlowTab.Search, defaultStartRoute) else navController.navigate("search") }, - onOpenSettings = { target -> navController.navigate("settings?target=${target.encode()}") }, onNavigateToHistory = { navController.navigate("history") }, diff --git a/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowGlobalActions.kt b/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowGlobalActions.kt index 4f6b6e2660..eba1c0a118 100644 --- a/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowGlobalActions.kt +++ b/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowGlobalActions.kt @@ -13,16 +13,21 @@ import kotlinx.coroutines.flow.StateFlow * Before this existed, `notifications` had a single entry point — the Home top bar — so turning * Home off in navigation settings orphaned the screen entirely. Root tabs 3 (Subscriptions) and 4 * (Library) can never be hidden, so rendering these actions on every backless destination - * guarantees reachability for any navigation configuration. + * guarantees reachability for any navigation configuration. The profile avatar is here for the + * same reason. * - * [unreadNotifications] is the flow rather than the current value so that a new notification - * invalidates only the badge that collects it, instead of the whole shell that provides it. + * [unreadNotifications] and [account] are flows rather than current values so that a change + * invalidates only the actions that collect them, instead of the whole shell that provides them. + * [account] is null until it is read, and [profileAction] draws the avatar, given whether its menu + * holds Settings; the shell supplies it so app chrome needs no knowledge of profiles. */ @Immutable data class FlowGlobalActions( val unreadNotifications: StateFlow, + val account: StateFlow, val onOpenNotifications: () -> Unit, val onOpenSettings: () -> Unit, + val profileAction: @Composable (withSettings: Boolean) -> Unit, ) /** @@ -38,16 +43,20 @@ val LocalFlowGlobalActions = staticCompositionLocalOf { null @Composable fun ProvideFlowGlobalActions( unreadNotifications: StateFlow, + account: StateFlow, onOpenNotifications: () -> Unit, onOpenSettings: () -> Unit, + profileAction: @Composable (withSettings: Boolean) -> Unit, content: @Composable () -> Unit, ) { val actions = - remember(unreadNotifications, onOpenNotifications, onOpenSettings) { + remember(unreadNotifications, account, onOpenNotifications, onOpenSettings, profileAction) { FlowGlobalActions( unreadNotifications = unreadNotifications, + account = account, onOpenNotifications = onOpenNotifications, onOpenSettings = onOpenSettings, + profileAction = profileAction, ) } CompositionLocalProvider(LocalFlowGlobalActions provides actions, content = content) diff --git a/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBar.kt b/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBar.kt index df2cc8bdc8..d7d52dc1d8 100644 --- a/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBar.kt +++ b/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBar.kt @@ -40,7 +40,8 @@ enum class FlowGlobalActionsMode { * with a [leading] slot is still treated as a root destination. * @param actions screen-specific actions. Keep this to two on a root destination; put the rest in * [FlowTopBarOverflow] so the title keeps its width. - * @param trailingAction drawn after the global actions, last in the bar: Home's profile avatar. + * @param crowded set by a root destination with two [actions]: its profile avatar holds Settings by + * default, so the bar ends with three global actions rather than four. */ @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -53,7 +54,7 @@ fun FlowTopBar( actions: @Composable RowScope.() -> Unit = {}, globalActions: FlowGlobalActionsMode = FlowGlobalActionsMode.Auto, windowInsets: WindowInsets = FlowTopBarDefaults.WindowInsets, - trailingAction: (@Composable () -> Unit)? = null, + crowded: Boolean = false, ) { FlowTopBar( modifier = modifier, @@ -65,7 +66,7 @@ fun FlowTopBar( actions = actions, globalActions = globalActions, windowInsets = windowInsets, - trailingAction = trailingAction, + crowded = crowded, ) } @@ -84,7 +85,7 @@ fun FlowTopBar( actions: @Composable RowScope.() -> Unit = {}, globalActions: FlowGlobalActionsMode = FlowGlobalActionsMode.Auto, windowInsets: WindowInsets = FlowTopBarDefaults.WindowInsets, - trailingAction: (@Composable () -> Unit)? = null, + crowded: Boolean = false, ) { val showGlobalActions = when (globalActions) { @@ -115,9 +116,8 @@ fun FlowTopBar( actions = { actions() if (showGlobalActions) { - FlowGlobalActionsRow() + FlowGlobalActionsRow(crowded) } - trailingAction?.invoke() }, colors = FlowTopBarDefaults.colors(), windowInsets = windowInsets, diff --git a/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBarActions.kt b/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBarActions.kt index 67aed1696f..63cd365f10 100644 --- a/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBarActions.kt +++ b/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/FlowTopBarActions.kt @@ -32,25 +32,34 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import io.github.aedev.flow.R /** - * The Notifications and Settings actions every root destination gets. + * The Notifications, Settings and profile actions every root destination gets, Settings and profile + * as [topBarAccount] decides for a [crowded] or roomy bar. Until the account switches are read only + * Notifications shows, so a bar whose profile holds Settings never flashes the settings icon. * * Renders nothing when the shell has not provided [LocalFlowGlobalActions] — the case in previews * and in isolated Compose tests. */ @Composable -internal fun FlowGlobalActionsRow() { +internal fun FlowGlobalActionsRow(crowded: Boolean) { val actions = LocalFlowGlobalActions.current ?: return val unreadCount by actions.unreadNotifications.collectAsStateWithLifecycle() + val settings by actions.account.collectAsStateWithLifecycle() FlowNotificationsAction( unreadCount = unreadCount, onClick = actions.onOpenNotifications, ) - IconButton(onClick = actions.onOpenSettings) { - Icon( - imageVector = Icons.Outlined.Settings, - contentDescription = stringResource(R.string.settings), - ) + val account = settings?.let { topBarAccount(it, crowded) } ?: return + if (account != TopBarAccount.PROFILE_WITH_SETTINGS) { + IconButton(onClick = actions.onOpenSettings) { + Icon( + imageVector = Icons.Outlined.Settings, + contentDescription = stringResource(R.string.settings), + ) + } + } + if (account != TopBarAccount.SETTINGS_ONLY) { + actions.profileAction(account == TopBarAccount.PROFILE_WITH_SETTINGS) } } diff --git a/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/TopBarAccount.kt b/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/TopBarAccount.kt new file mode 100644 index 0000000000..bf77f68b2c --- /dev/null +++ b/app/src/main/java/io/github/aedev/flow/ui/components/layout/topbar/TopBarAccount.kt @@ -0,0 +1,36 @@ +package io.github.aedev.flow.ui.components.layout.topbar + +import androidx.compose.runtime.Immutable + +/** The two account switches as stored. */ +@Immutable +data class TopBarAccountSettings( + val showProfile: Boolean, + val settingsInProfileMenu: Boolean, +) + +/** Which account buttons a root top bar ends with. */ +enum class TopBarAccount { + /** The settings icon, then the profile avatar. */ + PROFILE_AND_SETTINGS, + + /** The profile avatar alone; its menu opens Settings. */ + PROFILE_WITH_SETTINGS, + + /** The settings icon alone. */ + SETTINGS_ONLY, +} + +/** + * A hidden profile always leaves the settings icon, so no combination loses Settings. A [crowded] bar, one with two + * screen actions of its own, folds Settings into the profile so its title keeps its width. + */ +fun topBarAccount( + settings: TopBarAccountSettings, + crowded: Boolean, +): TopBarAccount = + when { + !settings.showProfile -> TopBarAccount.SETTINGS_ONLY + settings.settingsInProfileMenu || crowded -> TopBarAccount.PROFILE_WITH_SETTINGS + else -> TopBarAccount.PROFILE_AND_SETTINGS + } diff --git a/app/src/main/java/io/github/aedev/flow/ui/components/profiles/ProfileSwitchSheet.kt b/app/src/main/java/io/github/aedev/flow/ui/components/profiles/ProfileSwitchSheet.kt index 03175e5185..f8b76f4272 100644 --- a/app/src/main/java/io/github/aedev/flow/ui/components/profiles/ProfileSwitchSheet.kt +++ b/app/src/main/java/io/github/aedev/flow/ui/components/profiles/ProfileSwitchSheet.kt @@ -16,6 +16,7 @@ import androidx.compose.material.icons.filled.ExpandLess import androidx.compose.material.icons.filled.ExpandMore import androidx.compose.material.icons.outlined.ManageAccounts import androidx.compose.material.icons.outlined.PersonAdd +import androidx.compose.material.icons.outlined.Settings import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -34,7 +35,6 @@ import androidx.compose.ui.semantics.contentDescription import androidx.compose.ui.semantics.semantics import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.dp -import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import io.github.aedev.flow.R import io.github.aedev.flow.data.profile.Profile @@ -73,34 +73,40 @@ fun SwitchRefusals(viewModel: ProfileSwitchViewModel) { } /** - * The running profile's avatar as a top bar action, opening the way to switch, add or manage profiles. It shows with - * a single profile too, so the feature can be found. + * The running profile's avatar as a top bar action, opening the way to switch, add or manage profiles, and to + * Settings [withSettings]. It shows with a single profile too, so the feature can be found. The caller shows + * [SwitchRefusals] once for [viewModel], since several bars can share it. */ @Composable fun ProfileTopBarAction( - onOpenSettings: (SettingsTarget) -> Unit, - viewModel: ProfileSwitchViewModel = hiltViewModel(), + withSettings: Boolean, + onOpenSettings: () -> Unit, + onOpenSettingsPage: (SettingsTarget) -> Unit, + viewModel: ProfileSwitchViewModel, ) { val context = LocalContext.current val state by viewModel.state.collectAsStateWithLifecycle() val running = state?.profiles?.firstOrNull { it.id == viewModel.runningId } ?: return var open by rememberSaveable { mutableStateOf(false) } - val description = stringResource(R.string.profiles_action_description, running.displayName(context)) + val description = + stringResource( + if (withSettings) R.string.profiles_action_settings_description else R.string.profiles_action_description, + running.displayName(context), + ) IconButton(onClick = { open = true }, modifier = Modifier.semantics { contentDescription = description }) { ProfileAvatar(running, size = TopBarAvatarSize) } - SwitchRefusals(viewModel) - if (open) { ProfileSwitchSheet( profiles = state?.profiles.orEmpty(), runningId = viewModel.runningId, onSwitch = viewModel::switchTo, - onAdd = { onOpenSettings(SettingsTarget(SettingsDestination.PROFILE_EDIT)) }, - onManage = { onOpenSettings(SettingsTarget(SettingsDestination.PROFILES)) }, + onAdd = { onOpenSettingsPage(SettingsTarget(SettingsDestination.PROFILE_EDIT)) }, + onManage = { onOpenSettingsPage(SettingsTarget(SettingsDestination.PROFILES)) }, onDismiss = { open = false }, + onOpenSettings = onOpenSettings.takeIf { withSettings }, ) } } @@ -113,6 +119,7 @@ internal fun ProfileSwitchSheet( onAdd: () -> Unit, onManage: () -> Unit, onDismiss: () -> Unit, + onOpenSettings: (() -> Unit)? = null, ) { val context = LocalContext.current val atLimit = profiles.size >= ProfileRegistry.MAX_PROFILES @@ -158,6 +165,26 @@ internal fun ProfileSwitchSheet( }, ), ) + if (onOpenSettings != null) { + Spacer(Modifier.height(GroupSpacing)) + QuickActionsGroup( + title = null, + rows = + listOf( + QuickActionRow("profiles.settings") { shape -> + FlowNavRow( + title = stringResource(R.string.settings), + onClick = { + sheet.close() + onOpenSettings() + }, + leadingIcon = Icons.Outlined.Settings, + shape = shape, + ) + }, + ), + ) + } Text( text = stringResource(R.string.profiles_sheet_footer), style = MaterialTheme.typography.bodySmall, diff --git a/app/src/main/java/io/github/aedev/flow/ui/components/profiles/ProfileSwitchViewModel.kt b/app/src/main/java/io/github/aedev/flow/ui/components/profiles/ProfileSwitchViewModel.kt index 99c287af8d..6f24e8059a 100644 --- a/app/src/main/java/io/github/aedev/flow/ui/components/profiles/ProfileSwitchViewModel.kt +++ b/app/src/main/java/io/github/aedev/flow/ui/components/profiles/ProfileSwitchViewModel.kt @@ -5,17 +5,20 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import dagger.hilt.android.lifecycle.HiltViewModel import dagger.hilt.android.qualifiers.ApplicationContext +import io.github.aedev.flow.data.local.PlayerPreferences import io.github.aedev.flow.data.profile.ActiveProfile import io.github.aedev.flow.data.profile.ProfileRegistryState import io.github.aedev.flow.data.profile.ProfileRepository import io.github.aedev.flow.data.profile.ProfileSwitcher import io.github.aedev.flow.data.profile.SwitchRefusal import io.github.aedev.flow.data.profile.SwitchResult +import io.github.aedev.flow.ui.components.layout.topbar.TopBarAccountSettings import kotlinx.coroutines.CancellationException import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch import javax.inject.Inject @@ -28,8 +31,15 @@ class ProfileSwitchViewModel @ApplicationContext context: Context, private val profiles: ProfileRepository, private val switcher: ProfileSwitcher, + preferences: PlayerPreferences, ) : ViewModel() { val state: StateFlow = profiles.state.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), null) + + /** Whether the top bars show the avatar and whether its menu holds Settings; null until read. */ + val topBarAccount: StateFlow = + combine(preferences.showProfileInTopBar, preferences.settingsInProfileMenu, ::TopBarAccountSettings) + .stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), null) + val runningId: String = ActiveProfile.get(context).id /** This is the first process after a switch: what a cold start would ask has been answered. */ diff --git a/app/src/main/java/io/github/aedev/flow/ui/screens/home/HomeScreen.kt b/app/src/main/java/io/github/aedev/flow/ui/screens/home/HomeScreen.kt index 450cf89089..5a53aa35f9 100644 --- a/app/src/main/java/io/github/aedev/flow/ui/screens/home/HomeScreen.kt +++ b/app/src/main/java/io/github/aedev/flow/ui/screens/home/HomeScreen.kt @@ -52,9 +52,7 @@ import io.github.aedev.flow.ui.components.layout.LocalFlowBottomInsets import io.github.aedev.flow.ui.components.layout.floatAboveBottomChrome import io.github.aedev.flow.ui.components.layout.navigation.FlowTab import io.github.aedev.flow.ui.components.layout.topbar.FlowTopBar -import io.github.aedev.flow.ui.components.profiles.ProfileTopBarAction import io.github.aedev.flow.ui.components.rememberFeedGridLayout -import io.github.aedev.flow.ui.components.settings.SettingsTarget import io.github.aedev.flow.ui.components.shared.FlowPullToRefreshBox import io.github.aedev.flow.ui.screens.home.chips.HomeChipRow import kotlinx.coroutines.flow.collectLatest @@ -68,7 +66,6 @@ fun HomeScreen( onVideoClick: (Video) -> Unit, onShortClick: (ShortsQueueSource) -> Unit, onSearchClick: () -> Unit, - onOpenSettings: (SettingsTarget) -> Unit = {}, onNavigateToHistory: () -> Unit = {}, onOpenShortsFeed: () -> Unit = {}, onPlayMix: (videos: List