A cheap attempt at a native Bluesky client for Android
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

TimelineView: make the modal go under the display insets

geesawra 3d43174a 69e3cf02

+11 -15
+11 -15
app/src/main/java/industries/geesawra/jerryno/TimelineView.kt
··· 14 14 import androidx.compose.foundation.layout.Row 15 15 import androidx.compose.foundation.layout.Spacer 16 16 import androidx.compose.foundation.layout.WindowInsets 17 - import androidx.compose.foundation.layout.consumeWindowInsets 18 - import androidx.compose.foundation.layout.fillMaxHeight 17 + import androidx.compose.foundation.layout.displayCutout 19 18 import androidx.compose.foundation.layout.fillMaxSize 20 19 import androidx.compose.foundation.layout.fillMaxWidth 21 20 import androidx.compose.foundation.layout.heightIn ··· 42 41 import androidx.compose.material3.DrawerValue 43 42 import androidx.compose.material3.ExperimentalMaterial3Api 44 43 import androidx.compose.material3.FloatingActionButton 45 - import androidx.compose.material3.HorizontalDivider 46 44 import androidx.compose.material3.Icon 47 45 import androidx.compose.material3.IconButton 48 46 import androidx.compose.material3.LargeTopAppBar ··· 170 168 171 169 172 170 BottomSheetScaffold( 171 + modifier = Modifier.windowInsetsPadding(WindowInsets.displayCutout), 173 172 scaffoldState = scaffoldState, 174 173 sheetPeekHeight = 0.dp, 175 174 sheetContent = { ··· 177 176 Box( 178 177 modifier = Modifier 179 178 .fillMaxWidth() 180 - .windowInsetsPadding(WindowInsets.ime) 181 - .consumeWindowInsets(WindowInsets.ime) 179 + .windowInsetsPadding( 180 + WindowInsets.ime 181 + ) 182 + .padding(16.dp) // General content padding 182 183 ) { 183 184 Column( 184 185 modifier = Modifier 185 - .fillMaxWidth() 186 - .fillMaxHeight(), 186 + .fillMaxWidth(), // Removed .fillMaxHeight() 187 187 horizontalAlignment = Alignment.CenterHorizontally 188 188 ) { 189 189 Row { ··· 201 201 keyboardActions = KeyboardActions( 202 202 onDone = { 203 203 this.defaultKeyboardAction(ImeAction.Done) 204 - // Optionally hide keyboard here 205 204 keyboardController?.hide() 206 205 } 207 206 ), ··· 237 236 modifier = Modifier 238 237 .heightIn(max = 180.dp) 239 238 .fillMaxWidth() 240 - .padding(8.dp) 239 + .padding(8.dp) // This padding is for the Card itself, not the Box's content 241 240 ) { 242 241 PostImageGallery( 243 242 modifier = Modifier ··· 253 252 } 254 253 } 255 254 256 - Spacer(modifier = Modifier.padding(4.dp)) // Reduced spacer, was Modifier.height(8.dp) 257 - 255 + Spacer(modifier = Modifier.padding(4.dp)) 258 256 259 257 Row( 260 258 modifier = Modifier.fillMaxWidth(), ··· 293 291 null 294 292 ).onSuccess { 295 293 scaffoldState.bottomSheetState.hide() 296 - postText = "" // Clear the text field 297 - wasEdited.value = false // Reset edited state 294 + postText = "" 295 + wasEdited.value = false 298 296 postButtonEnabled.value = true 299 297 uploadingPost.value = false 300 298 }.onFailure { ··· 492 490 selectFeed("following", "Following", null) 493 491 } 494 492 ) 495 - HorizontalDivider() 496 493 497 494 timelineViewModel.uiState.feeds.forEach { 498 495 NavigationDrawerItem( ··· 522 519 selectFeed(it.uri.atUri, it.displayName, it.avatar?.uri) 523 520 } 524 521 ) 525 - HorizontalDivider() 526 522 } 527 523 528 524 }