advplyr.audiobookshelf-app/ios/App/Shared/util/Store.swift

23 lines
547 B
Swift
Raw Normal View History

2022-04-11 16:29:19 +02:00
//
// Store.swift
// App
//
// Created by Rasmus Krämer on 11.04.22.
//
import Foundation
import RealmSwift
class Store {
2022-04-11 16:30:13 +02:00
// ONLY USE REALM IN Database.realmQueue OR ELSE THE APP WILL CRASH
2022-04-11 16:29:19 +02:00
public static var serverConfig: ServerConnectionConfig {
get {
2022-04-11 18:31:14 +02:00
// TODO: change this when multiple configs are possible
Database.getServerConnectionConfigs()[Database.getActiveServerConfigIndex()]
2022-04-11 16:29:19 +02:00
}
set(updated) {
Database.setServerConnectionConfig(config: updated)
}
}
}