diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-11-02 13:38:19 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-11-02 13:42:53 -0400 |
| commit | 77f750496d9e6e0f9301646f4066dc53e4ad7fab (patch) | |
| tree | 42adeefe72ca9875cd06d38b6d125625c176d492 /ui/lib/store | |
| parent | a238cd143efac9f2f9cd77afc2a407840318b0b1 (diff) | |
Remove notification permissions prompt.
On Safari (iOS and macOS), the permissions prompt can only be done during a user gesture; mounting is sufficiently disconnected from any user gestures that it's not allowed. The browser raises an exception, which, since it is unhandled, then leaks out and interrupts SvelteKit's element unmounting, leading to the whole UI being duplicated when switching channels (the old UI is not unmounted).
Diffstat (limited to 'ui/lib/store')
| -rw-r--r-- | ui/lib/store/channels.js | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/ui/lib/store/channels.js b/ui/lib/store/channels.js index 6d722c5..b57ca7e 100644 --- a/ui/lib/store/channels.js +++ b/ui/lib/store/channels.js @@ -1,26 +1,17 @@ export class Channels { constructor() { this.channels = []; - this.channelData = {}; } setChannels(channels) { this.channels = [...channels]; this.sort(); - this.channelData = channels.reduce( - (acc, val) => ({ - ...acc, - [val.id]: val.name, - }), - {} - ); return this; } addChannel(id, name) { this.channels = [...this.channels, { id, name }]; this.sort(); - this.channelData[id] = name; return this; } @@ -29,14 +20,9 @@ export class Channels { if (channelIndex !== -1) { this.channels.splice(channelIndex, 1); } - delete this.channelData[id]; return this; } - get(id) { - return this.channelData[id]; - } - sort() { this.channels.sort((a, b) => { if (a.name < b.name) { |
