Skip to content

Commit

Permalink
Fix servers configuration migration
Browse files Browse the repository at this point in the history
  • Loading branch information
equeim committed Jan 16, 2024
1 parent b7e4058 commit 9f6c261
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions rpc/src/main/kotlin/org/equeim/tremotesf/rpc/Servers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import android.content.Context
import androidx.annotation.AnyThread
import androidx.annotation.MainThread
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.*
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.SerialName
Expand Down Expand Up @@ -56,7 +60,10 @@ abstract class Servers(
val hasServers: Flow<Boolean> = _serversState.map { it.servers.isNotEmpty() }.distinctUntilChanged()
val currentServer: Flow<Server?> = _serversState.map { it.currentServer }.distinctUntilChanged()

private val json = Json { prettyPrint = true }
private val json = Json {
prettyPrint = true
ignoreUnknownKeys = true
}

init {
load()
Expand Down

0 comments on commit 9f6c261

Please sign in to comment.