mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-22 08:32:11 +00:00
Skip backup repository on simulator (#1048)
ProfileManager is behaving crazy because on simulator local and backup repository point to the same container.
This commit is contained in:
parent
edb7c29b26
commit
24ddb270aa
@ -182,7 +182,7 @@ private extension CoreDataRepository {
|
||||
|
||||
let newController = NSFetchedResultsController(
|
||||
fetchRequest: request,
|
||||
managedObjectContext: self.context,
|
||||
managedObjectContext: context,
|
||||
sectionNameKeyPath: nil,
|
||||
cacheName: nil
|
||||
)
|
||||
|
@ -90,6 +90,7 @@ extension AppContext {
|
||||
model: cdRemoteModel,
|
||||
observingResults: true
|
||||
)
|
||||
let backupProfileRepository: ProfileRepository? = nil
|
||||
#else
|
||||
let tunnelStrategy = NETunnelStrategy(
|
||||
bundleIdentifier: BundleConfiguration.mainString(for: .tunnelId),
|
||||
@ -99,15 +100,16 @@ extension AppContext {
|
||||
let mainProfileRepository = NEProfileRepository(repository: tunnelStrategy) {
|
||||
dependencies.profileTitle($0)
|
||||
}
|
||||
let backupProfileRepository = dependencies.backupProfileRepository(
|
||||
model: cdRemoteModel,
|
||||
observingResults: false
|
||||
)
|
||||
#endif
|
||||
|
||||
let profileManager = ProfileManager(
|
||||
processor: processor,
|
||||
repository: mainProfileRepository,
|
||||
backupRepository: dependencies.backupProfileRepository(
|
||||
model: cdRemoteModel,
|
||||
observingResults: false
|
||||
),
|
||||
backupRepository: backupProfileRepository,
|
||||
mirrorsRemoteRepository: dependencies.mirrorsRemoteRepository,
|
||||
readyAfterRemote: true
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user