mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-16 00:44:51 +02:00
Fix persisting active config
This commit is contained in:
parent
f6c43e479d
commit
a7424cc428
3 changed files with 12 additions and 13 deletions
|
@ -11,7 +11,7 @@ import Unrealm
|
|||
|
||||
struct ServerConnectionConfig: Realmable {
|
||||
var id: String = UUID().uuidString
|
||||
var index: Int = 0
|
||||
var index: Int = 1
|
||||
var name: String = ""
|
||||
var address: String = ""
|
||||
var userId: String = ""
|
||||
|
@ -30,6 +30,10 @@ struct ServerConnectionConfig: Realmable {
|
|||
struct ServerConnectionConfigActiveIndex: Realmable {
|
||||
// This could overflow, but you really would have to try
|
||||
var index: Int?
|
||||
|
||||
static func primaryKey() -> String? {
|
||||
return "index"
|
||||
}
|
||||
}
|
||||
|
||||
func convertServerConnectionConfigToJSON(config: ServerConnectionConfig) -> Dictionary<String, Any> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue