Skip to content

Commit

Permalink
undo
Browse files Browse the repository at this point in the history
  • Loading branch information
billypchan committed Aug 19, 2019
1 parent 9e1a9b0 commit 7dccabb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions WireCommonComponents/BackendEnvironment+Shared.swift
Expand Up @@ -18,19 +18,18 @@

import Foundation
import WireTransport
import WireUtilities

extension BackendEnvironment {

public static let backendSwitchNotification = Notification.Name("backendEnvironmentSwitchNotification")

public static var shared: BackendEnvironment = {
let bundle = Bundle.backendBundle
guard let environment = BackendEnvironment(userDefaults: .shared(), configurationBundle: .backendBundle) else { fatalError("Malformed backend configuration data") }
guard let environment = BackendEnvironment(userDefaults: .standard, configurationBundle: .backendBundle) else { fatalError("Malformed backend configuration data") }
return environment
}() {
didSet {
shared.save(in: .shared())
shared.save(in: .standard)
NotificationCenter.default.post(name: backendSwitchNotification, object: shared)
}
}
Expand Down

0 comments on commit 7dccabb

Please sign in to comment.