05/29 Update functionalities
This commit is contained in:
@@ -1877,10 +1877,13 @@ struct SettingsView: View {
|
||||
Section {
|
||||
Button(role: .destructive) {
|
||||
Task {
|
||||
// Clear server-pulled issues before logging out so stale
|
||||
// records from a previous server/domain don't persist into
|
||||
// the next session. Device-created pending issues are preserved.
|
||||
clearServerPulledData()
|
||||
// Do NOT clear server-pulled data on a plain logout —
|
||||
// the user is logging out of the same server, so cached
|
||||
// facilities, issues, and templates are still valid on
|
||||
// their next login. Clearing here leaves the issues list
|
||||
// empty until a full sync succeeds, which breaks offline use.
|
||||
// Server-pulled data is only cleared when switching servers
|
||||
// (see the Switch & Log Out alert below).
|
||||
sync.resetNotificationPoller()
|
||||
await auth.logout()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user