Do not import remote profiles on first load
This commit is contained in:
parent
eea5486563
commit
671dc7f77c
|
@ -268,11 +268,17 @@ private extension ProfileManager {
|
|||
}
|
||||
|
||||
func notifyRemoteEntities(_ result: EntitiesResult<Profile>) {
|
||||
let isInitial = allRemoteProfiles.isEmpty
|
||||
allRemoteProfiles = result.entities.reduce(into: [:]) {
|
||||
$0[$1.id] = $1
|
||||
}
|
||||
objectWillChange.send()
|
||||
|
||||
// do not import on initial load
|
||||
guard !isInitial else {
|
||||
return
|
||||
}
|
||||
|
||||
// pull remote updates into local profiles (best-effort)
|
||||
let profilesToImport = allRemoteProfiles.values
|
||||
Task.detached { [weak self] in
|
||||
|
|
Loading…
Reference in New Issue