Skip to content

Commit 66952fe

Browse files
committed
Fix typos
1 parent 751ca3b commit 66952fe

File tree

6 files changed

+212
-270
lines changed

6 files changed

+212
-270
lines changed

app-backup/src/main/java/xyz/aprildown/timer/app/backup/BaseBackupViewModel.kt

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package xyz.aprildown.timer.app.backup
22

33
import androidx.compose.runtime.Immutable
4-
import kotlinx.coroutines.CancellationException
54
import kotlinx.coroutines.CoroutineDispatcher
5+
import kotlinx.coroutines.ensureActive
66
import kotlinx.coroutines.flow.MutableStateFlow
77
import kotlinx.coroutines.flow.StateFlow
88
import kotlinx.coroutines.flow.asStateFlow
@@ -108,9 +108,8 @@ internal abstract class BaseBackupViewModel<ContentType : BaseBackupViewModel.Sc
108108
backupResult = Fruit.Ripe(Unit),
109109
)
110110
}
111-
} catch (e: CancellationException) {
112-
throw e
113111
} catch (e: Exception) {
112+
coroutineContext.ensureActive()
114113
_screen.update {
115114
it.copy(
116115
backupOngoing = false,

app-backup/src/main/java/xyz/aprildown/timer/app/backup/ImportFragment.kt

+7-10
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,6 @@ private fun WipeContent(
165165
modifier: Modifier = Modifier
166166
) {
167167
var showAlert by remember { mutableStateOf(false) }
168-
val onWipeChangedAlert: (Boolean) -> Unit = remember(onWipeChanged) {
169-
{ wipe: Boolean ->
170-
if (wipe) {
171-
showAlert = true
172-
} else {
173-
onWipeChanged(false)
174-
}
175-
}
176-
}
177168

178169
ListItem(
179170
headlineContent = {
@@ -183,7 +174,13 @@ private fun WipeContent(
183174
.toggleable(
184175
value = wipe,
185176
role = Role.Switch,
186-
onValueChange = onWipeChangedAlert,
177+
onValueChange = {
178+
if (it) {
179+
showAlert = true
180+
} else {
181+
onWipeChanged(false)
182+
}
183+
},
187184
),
188185
leadingContent = {
189186
Icon(

component-key/src/main/java/xyz/aprildown/timer/component/key/ImagePreviewActivity.kt

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class ImagePreviewActivity : ComponentActivity() {
4444
return
4545
}
4646

47-
4847
setContent {
4948
var data: String? by rememberSaveable { mutableStateOf(path) }
5049

component-key/src/main/res/values/themes.xml

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
43
<style name="AppTheme.ImagePreview">
54
<item name="android:windowBackground">@android:color/transparent</item>
65
<item name="android:windowIsTranslucent">true</item>

0 commit comments

Comments
 (0)