Fix sources menu crash when put in background

This commit is contained in:
Syer10
2022-04-07 19:40:27 -04:00
parent ac589c0b5c
commit 42a9eb628f
3 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package ca.gosyer.jui.core.io
expect interface Serializable

View File

@@ -0,0 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package ca.gosyer.jui.core.io
actual typealias Serializable = java.io.Serializable

View File

@@ -7,6 +7,7 @@
package ca.gosyer.jui.data.models
import kotlinx.serialization.Serializable
import ca.gosyer.jui.core.io.Serializable as JvmSerializable
@Serializable
data class Source(
@@ -18,7 +19,7 @@ data class Source(
val isConfigurable: Boolean,
val isNsfw: Boolean,
val displayName: String
) {
): JvmSerializable {
val displayLang: String
get() = if (id == LOCAL_SOURCE_ID) {
"other"