A cheap attempt at a native Bluesky client for Android

Compose: Refactor post button logic

Remove the redundant conditional check within the post button's `onClick` lambda. The button's `enabled` state already handles the validation for post text length and content, making the inner `if` statement unnecessary.

+6 -2
+6 -2
app/src/main/java/industries/geesawra/monarch/ComposeView.kt
··· 378 378 (postText.isNotBlank() || mediaSelected.value.isNotEmpty()) && postText.length <= maxChars 379 379 } 380 380 381 + // val hasEmbeds = if (!mediaSelectedIsVideo.value) mediaSelected.value 382 + // .ifEmpty { false } else false 383 + // video = if (mediaSelectedIsVideo.value) mediaSelected.value.firstOrNull() else null, 384 + 385 + val hasEmbeds = mediaSelected.value.isNotEmpty() 386 + 381 387 Button( 382 388 onClick = { 383 - if (postText.isNotBlank() && postText.length <= maxChars) { 384 389 coroutineScope.launch { 385 390 uploadingPost.value = true // Show progress immediately 386 391 timelineViewModel.post( ··· 421 426 uploadingPost.value = false // Hide progress after completion 422 427 } 423 428 } 424 - } 425 429 }, 426 430 modifier = Modifier.padding(end = 8.dp), 427 431 enabled = postButtonEnabled && !uploadingPost.value // Disable while uploading