Fix profile list sync
// it works, but why?
This commit is contained in:
@@ -125,12 +125,9 @@ public struct ProfileView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onReceive(environments.profileUpdate) { _ in
|
.onReceive(environments.profileUpdate) { _ in
|
||||||
profileList = []
|
Task {
|
||||||
isLoading = true
|
await doReload()
|
||||||
// not updated, but why?
|
}
|
||||||
// Task {
|
|
||||||
// await doReload()
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
@@ -232,7 +229,7 @@ public struct ProfileView: View {
|
|||||||
alert = Alert(error)
|
alert = Alert(error)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await doReload()
|
environments.profileUpdate.send()
|
||||||
}
|
}
|
||||||
|
|
||||||
private func moveProfile(from source: IndexSet, to destination: Int) {
|
private func moveProfile(from source: IndexSet, to destination: Int) {
|
||||||
@@ -247,6 +244,7 @@ public struct ProfileView: View {
|
|||||||
} catch {
|
} catch {
|
||||||
alert = Alert(error)
|
alert = Alert(error)
|
||||||
}
|
}
|
||||||
|
environments.profileUpdate.send()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,6 +260,7 @@ public struct ProfileView: View {
|
|||||||
} catch {
|
} catch {
|
||||||
alert = Alert(error)
|
alert = Alert(error)
|
||||||
}
|
}
|
||||||
|
environments.profileUpdate.send()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user