diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-03-01 16:54:50 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 16:54:50 -0600 |
commit | 9b46b2e6a9a8e4e9254fa9031b2eb44a672e287f (patch) | |
tree | 91fa22c6de7d8450a8b55ebac4168390cfc586ce /src/state/models | |
parent | 1fd2942b9bbb973b72a386c24a9a51aaa50df185 (diff) | |
download | voidsky-9b46b2e6a9a8e4e9254fa9031b2eb44a672e287f.tar.zst |
A couple various fixes (#242)
* Fix: set the status bar color for dark mode when logging in * Add some logging * Improve read/unread tracking behaviors in notifications
Diffstat (limited to 'src/state/models')
-rw-r--r-- | src/state/models/notifications-view.ts | 3 | ||||
-rw-r--r-- | src/state/models/root-store.ts | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/state/models/notifications-view.ts b/src/state/models/notifications-view.ts index 048de968d..e88af590b 100644 --- a/src/state/models/notifications-view.ts +++ b/src/state/models/notifications-view.ts @@ -405,6 +405,9 @@ export class NotificationsViewModel { try { this.unreadCount = 0 this.rootStore.emitUnreadNotifications(0) + for (const notif of this.notifications) { + notif.isRead = true + } await this.rootStore.api.app.bsky.notification.updateSeen({ seenAt: new Date().toISOString(), }) diff --git a/src/state/models/root-store.ts b/src/state/models/root-store.ts index d60df7dde..43523b759 100644 --- a/src/state/models/root-store.ts +++ b/src/state/models/root-store.ts @@ -46,10 +46,14 @@ export class RootStoreModel { hackUpgradeNeeded = false async hackCheckIfUpgradeNeeded() { try { + this.log.debug('hackCheckIfUpgradeNeeded()') const res = await fetch('https://bsky.social/xrpc/app.bsky.feed.getLikes') await res.text() runInAction(() => { this.hackUpgradeNeeded = res.status !== 501 + this.log.debug( + `hackCheckIfUpgradeNeeded() said ${this.hackUpgradeNeeded}`, + ) }) } catch (e) { this.log.error('Failed to hackCheckIfUpgradeNeeded', {e}) |