support multiple servers

This commit is contained in:
Rasmus Krämer 2022-04-15 10:16:11 +02:00
parent 9a7b2e8172
commit 29fd29728a
No known key found for this signature in database
GPG key ID: EC9E510611BFDAA2
8 changed files with 68 additions and 38 deletions

View file

@ -17,6 +17,11 @@ class ServerConnectionConfig: Object {
@Persisted var username: String
@Persisted var token: String
}
class ServerConnectionConfigActiveIndex: Object {
// This could overflow, but you really would have to try
@Persisted var index: Int?
}
func convertServerConnectionConfigToJSON(config: ServerConnectionConfig) -> Dictionary<String, Any> {
return Database.realmQueue.sync {