A cheap attempt at a native Bluesky client for Android

ThreadView: Add back button and use LargeTopAppBar

Add a back button to the `ThreadView` to allow users to navigate back.

The `MainView` was also updated to use `LargeTopAppBar` instead of `TopAppBar` for a more modern look.

+19 -3
+3
app/src/main/java/industries/geesawra/monarch/MainActivity.kt
··· 140 140 .windowInsetsPadding(WindowInsets.statusBars), 141 141 timelineViewModel = timelineViewModel, 142 142 coroutineScope = rememberCoroutineScope(), 143 + backButton = { 144 + navController.popBackStack() 145 + } 143 146 ) 144 147 } 145 148
+3 -3
app/src/main/java/industries/geesawra/monarch/MainView.kt
··· 36 36 import androidx.compose.material3.FloatingActionButtonDefaults 37 37 import androidx.compose.material3.Icon 38 38 import androidx.compose.material3.IconButton 39 + import androidx.compose.material3.LargeTopAppBar 39 40 import androidx.compose.material3.MaterialTheme 40 41 import androidx.compose.material3.ModalDrawerSheet 41 42 import androidx.compose.material3.ModalNavigationDrawer ··· 47 48 import androidx.compose.material3.Snackbar 48 49 import androidx.compose.material3.SnackbarHost 49 50 import androidx.compose.material3.Text 50 - import androidx.compose.material3.TopAppBar 51 51 import androidx.compose.material3.TopAppBarColors 52 52 import androidx.compose.material3.TopAppBarDefaults 53 53 import androidx.compose.material3.pulltorefresh.PullToRefreshBox ··· 286 286 .fillMaxSize() 287 287 .nestedScroll(scrollBehavior.nestedScrollConnection), 288 288 topBar = { 289 - TopAppBar( 289 + LargeTopAppBar( 290 290 colors = TopAppBarColors( 291 291 containerColor = MaterialTheme.colorScheme.background, 292 292 scrolledContainerColor = MaterialTheme.colorScheme.background, ··· 474 474 LaunchedEffect(notificationsState.canScrollBackward) { 475 475 TabBarDestinations.NOTIFICATIONS.badgeValue?.intValue = 0 476 476 } 477 - 477 + 478 478 when (currentDestination) { 479 479 TabBarDestinations.TIMELINE -> ShowSkeets( 480 480 viewModel = timelineViewModel,
+13
app/src/main/java/industries/geesawra/monarch/ThreadView.kt
··· 3 3 import androidx.compose.foundation.layout.Column 4 4 import androidx.compose.foundation.layout.fillMaxSize 5 5 import androidx.compose.foundation.layout.padding 6 + import androidx.compose.material.icons.Icons 7 + import androidx.compose.material.icons.automirrored.filled.ArrowBack 6 8 import androidx.compose.material3.ExperimentalMaterial3Api 9 + import androidx.compose.material3.Icon 10 + import androidx.compose.material3.IconButton 7 11 import androidx.compose.material3.MaterialTheme 8 12 import androidx.compose.material3.Scaffold 9 13 import androidx.compose.material3.Text ··· 26 30 fun ThreadView( 27 31 modifier: Modifier = Modifier, 28 32 timelineViewModel: TimelineViewModel, 33 + backButton: () -> Unit, 29 34 coroutineScope: CoroutineScope 30 35 ) { 31 36 val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior( ··· 54 59 actionIconContentColor = MaterialTheme.colorScheme.onBackground, 55 60 subtitleContentColor = MaterialTheme.colorScheme.onBackground 56 61 ), 62 + navigationIcon = { 63 + IconButton(onClick = backButton) { 64 + Icon( 65 + imageVector = Icons.AutoMirrored.Filled.ArrowBack, 66 + contentDescription = "Go back" 67 + ) 68 + } 69 + }, 57 70 title = { 58 71 Text("Thread") 59 72 },