A cheap attempt at a native Bluesky client for Android

SkeetView: render conditional card

+19 -9
+6 -6
app/build.gradle.kts
··· 17 17 targetSdk = 36 18 18 versionCode = 1 19 19 versionName = "1.0" 20 - 21 20 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 22 21 } 23 22 24 23 buildTypes { 25 24 release { 26 - isMinifyEnabled = false 25 + isMinifyEnabled = true 27 26 proguardFiles( 28 27 getDefaultProguardFile("proguard-android-optimize.txt"), 29 28 "proguard-rules.pro" ··· 32 31 } 33 32 } 34 33 compileOptions { 35 - sourceCompatibility = JavaVersion.VERSION_24 36 - targetCompatibility = JavaVersion.VERSION_24 34 + sourceCompatibility = JavaVersion.VERSION_21 35 + targetCompatibility = JavaVersion.VERSION_21 36 + version = JavaVersion.VERSION_21.toString() 37 37 } 38 - compileOptions { 39 - version = JavaVersion.VERSION_24.toString() 38 + kotlin { 39 + jvmToolchain(21) 40 40 } 41 41 buildFeatures { 42 42 compose = true
+1 -1
app/src/main/java/industries/geesawra/monarch/ComposeView.kt
··· 208 208 .background(Color.Transparent), 209 209 skeet = it, 210 210 nested = true, 211 - disableEmbeds = true 211 + disableEmbeds = false 212 212 ) 213 213 } 214 214 }
+12 -2
app/src/main/java/industries/geesawra/monarch/SkeetView.kt
··· 61 61 disableEmbeds: Boolean = false, 62 62 inThread: Boolean = false, 63 63 ) { 64 + if (skeet.blocked) { 65 + ConditionalCard("Blocked :(") 66 + return 67 + } 68 + 69 + if (skeet.notFound) { 70 + ConditionalCard("Post not found") 71 + return 72 + } 73 + 64 74 val minSize = 55.dp 65 75 66 76 val (parent, _) = skeet.parent() ··· 349 359 is RecordViewRecordUnion.GraphStarterPackViewBasic -> null 350 360 is RecordViewRecordUnion.LabelerLabelerView -> null 351 361 is RecordViewRecordUnion.Unknown -> null 352 - is RecordViewRecordUnion.ViewBlocked -> null 353 362 is RecordViewRecordUnion.ViewDetached -> null 354 - is RecordViewRecordUnion.ViewNotFound -> null 363 + is RecordViewRecordUnion.ViewBlocked -> SkeetData(blocked = true) 364 + is RecordViewRecordUnion.ViewNotFound -> SkeetData(notFound = true) 355 365 is RecordViewRecordUnion.ViewRecord -> SkeetData.fromRecordView(rv.value) 356 366 } 357 367