Skip to content

Commit 0ddd59b

Browse files
committed
clean up a few non-null assertions
1 parent 4b006a4 commit 0ddd59b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

shared/src/commonMain/kotlin/site/remlit/snowdrop/component/MiniStatus.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fun MiniStatus(status: Status) {
3636
.clip(RoundedCornerShape(10.dp))
3737
.border(1.dp, MaterialTheme.colorScheme.surfaceContainerHigh, RoundedCornerShape(10.dp))
3838
.clickable(onClick = {
39-
navHandler.navigate(ThreadRoute(status.id!!))
39+
navHandler.navigate(ThreadRoute(status.id))
4040
})
4141
) {
4242
Column(modifier = Modifier.padding(10.dp)) {

shared/src/commonMain/kotlin/site/remlit/snowdrop/view/ThreadView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fun ThreadView(id: String) = ViewSurface {
106106
items(
107107
items = ancestors,
108108
key = { status ->
109-
status.id!!
109+
status.id
110110
}
111111
) { status ->
112112
StatusComponent(status)
@@ -119,7 +119,7 @@ fun ThreadView(id: String) = ViewSurface {
119119
items(
120120
items = descendants,
121121
key = { status ->
122-
status.id!!
122+
status.id
123123
}
124124
) { status ->
125125
StatusComponent(status)

shared/src/commonMain/kotlin/site/remlit/snowdrop/view/TimelineView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ fun TimelineView() = ViewSurface {
148148
items(
149149
items = timeline,
150150
key = { status ->
151-
status.id!!
151+
status.id
152152
}
153153
) { status ->
154154
Status(status)

0 commit comments

Comments
 (0)