fix: show live ticker across app and website and suppress review emails
Some checks failed
Code Analysis and Production Deploy / analyze (push) Failing after 5m18s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Has been skipped

This commit is contained in:
Torsten Schulz (local)
2026-10-29 21:49:51 +01:00
parent 10a37180de
commit 472bec4519
29 changed files with 280 additions and 70 deletions

View File

@@ -80,8 +80,8 @@ private fun CompactNavigation(
navigationState: NavigationUiState = NavigationUiState(),
) {
val routeSection = menuSection(selectedRoute)
val sectionOverride = androidx.compose.runtime.remember { androidx.compose.runtime.mutableStateOf<MenuSection?>(null) }
val section = routeSection ?: sectionOverride.value
val sectionOverride = androidx.compose.runtime.remember(selectedRoute) { androidx.compose.runtime.mutableStateOf<MenuSection?>(null) }
val section = sectionOverride.value ?: routeSection
val subItems = submenu(section, navigationState)
val mainScroll = rememberScrollState()

View File

@@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@@ -45,13 +46,13 @@ fun NavGraph(
LaunchedEffect(currentRoute) {
navigationViewModel.refreshSession()
}
LaunchedEffect(currentRoute, navigationState.loggedIn) {
navigationViewModel.setLiveTickerActive(
navigationState.loggedIn && (currentRoute == "intern" || currentRoute?.startsWith("intern/") == true || currentRoute == "cms" || currentRoute?.startsWith("cms/") == true),
)
LaunchedEffect(navigationState.loggedIn) {
navigationViewModel.setLiveTickerActive(navigationState.loggedIn)
}
BoxWithConstraints(modifier = Modifier.fillMaxSize()) {
val persistentNavigation = maxWidth >= 600.dp
BoxWithConstraints(modifier = Modifier.fillMaxSize().systemBarsPadding()) {
val tabletNavigation = maxWidth >= 600.dp
// Signed-in phones share the same menu and ticker above every screen.
val persistentNavigation = tabletNavigation || navigationState.loggedIn
Column(modifier = Modifier.fillMaxSize()) {
navigationState.connectionNote?.let { message ->
Surface(color = Color(0xFFFFF4E5), modifier = Modifier.fillMaxWidth()) {
@@ -74,14 +75,16 @@ fun NavGraph(
}
}
},
webTabletNavigation = true,
webTabletNavigation = tabletNavigation,
navigationState = navigationState,
)
}
LiveTickerBanner(
matches = navigationState.liveTickerMatches,
loaded = navigationState.liveTickerLoaded,
)
if (navigationState.loggedIn) {
LiveTickerBanner(
matches = navigationState.liveTickerMatches,
loaded = navigationState.liveTickerLoaded,
)
}
NavHost(
navController = navController,
startDestination = startDestination,