fix: make screen data serializable
Otherwise crash would occur when app is backgrounded
This commit is contained in:
parent
f33cb691cf
commit
21d4d57975
2 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package com.aliucord.manager.ui.screens.installopts
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import java.io.Serializable
|
||||
|
||||
@Immutable
|
||||
data class InstallOptions(
|
||||
|
|
@ -8,4 +9,4 @@ data class InstallOptions(
|
|||
val packageName: String,
|
||||
val debuggable: Boolean,
|
||||
val replaceIcon: Boolean,
|
||||
)
|
||||
) : Serializable
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.aliucord.manager.R
|
||||
import java.io.Serializable
|
||||
|
||||
@Immutable
|
||||
sealed interface DiscordVersion : Comparable<DiscordVersion> {
|
||||
|
|
@ -14,7 +15,7 @@ sealed interface DiscordVersion : Comparable<DiscordVersion> {
|
|||
val type: Type,
|
||||
val name: String,
|
||||
val code: Int,
|
||||
) : DiscordVersion {
|
||||
) : DiscordVersion, Serializable {
|
||||
val rawCode: Int
|
||||
get() = (code / 1000 * 100) + code % 100
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue