05/29 Update functionalities

This commit is contained in:
Nguyen Ngo
2026-05-29 17:06:04 -04:00
parent 7d05c3862d
commit e4261778c8
5 changed files with 74 additions and 28 deletions
@@ -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()
}