tangled
alpha
login
or
join now
geesawra.industries
/
jerry-no
8
fork
atom
A cheap attempt at a native Bluesky client for Android
8
fork
atom
overview
issues
pulls
pipelines
SkeetView: render conditional card
geesawra.industries
5 months ago
40229b2e
e41a8e32
+19
-9
3 changed files
expand all
collapse all
unified
split
app
build.gradle.kts
src
main
java
industries
geesawra
monarch
ComposeView.kt
SkeetView.kt
+6
-6
app/build.gradle.kts
···
17
17
targetSdk = 36
18
18
versionCode = 1
19
19
versionName = "1.0"
20
20
-
21
20
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
22
21
}
23
22
24
23
buildTypes {
25
24
release {
26
26
-
isMinifyEnabled = false
25
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
35
-
sourceCompatibility = JavaVersion.VERSION_24
36
36
-
targetCompatibility = JavaVersion.VERSION_24
34
34
+
sourceCompatibility = JavaVersion.VERSION_21
35
35
+
targetCompatibility = JavaVersion.VERSION_21
36
36
+
version = JavaVersion.VERSION_21.toString()
37
37
}
38
38
-
compileOptions {
39
39
-
version = JavaVersion.VERSION_24.toString()
38
38
+
kotlin {
39
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
211
-
disableEmbeds = true
211
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
64
+
if (skeet.blocked) {
65
65
+
ConditionalCard("Blocked :(")
66
66
+
return
67
67
+
}
68
68
+
69
69
+
if (skeet.notFound) {
70
70
+
ConditionalCard("Post not found")
71
71
+
return
72
72
+
}
73
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
352
-
is RecordViewRecordUnion.ViewBlocked -> null
353
362
is RecordViewRecordUnion.ViewDetached -> null
354
354
-
is RecordViewRecordUnion.ViewNotFound -> null
363
363
+
is RecordViewRecordUnion.ViewBlocked -> SkeetData(blocked = true)
364
364
+
is RecordViewRecordUnion.ViewNotFound -> SkeetData(notFound = true)
355
365
is RecordViewRecordUnion.ViewRecord -> SkeetData.fromRecordView(rv.value)
356
366
}
357
367