Improved realm thread and added http client

This commit is contained in:
Rasmus Krämer 2022-04-14 11:54:53 +02:00
parent 4abd1c8b49
commit 736af85855
No known key found for this signature in database
GPG key ID: EC9E510611BFDAA2
14 changed files with 253 additions and 71 deletions

View file

@ -9,7 +9,7 @@ import Foundation
import RealmSwift
class Store {
private static var _serverConfig: ServerConnectionConfig?
@ThreadSafe private static var _serverConfig: ServerConnectionConfig?
// ONLY USE REALM IN Database.realmQueue OR ELSE THE APP WILL CRASH
public static var serverConfig: ServerConnectionConfig {
get {
@ -25,7 +25,7 @@ class Store {
}
set(updated) {
Database.setServerConnectionConfig(config: updated)
_serverConfig = updated
_serverConfig = nil
}
}
}