forked from coracle/flotilla
Disable alerts on logout
This commit is contained in:
@@ -64,7 +64,6 @@ import {
|
||||
tagEvent,
|
||||
tagEventForReaction,
|
||||
nip44EncryptToSelf,
|
||||
dropSession,
|
||||
tagEventForComment,
|
||||
tagEventForQuote,
|
||||
waitForThunkError,
|
||||
@@ -73,7 +72,6 @@ import {
|
||||
getThunkError,
|
||||
} from "@welshman/app"
|
||||
import {compressFile} from "@lib/html"
|
||||
import {kv, db} from "@app/core/storage"
|
||||
import type {SettingsValues} from "@app/core/state"
|
||||
import {
|
||||
SETTINGS,
|
||||
@@ -115,21 +113,6 @@ export const prependParent = (parent: TrustedEvent | undefined, {content, tags}:
|
||||
return {content, tags}
|
||||
}
|
||||
|
||||
// Log out
|
||||
|
||||
export const logout = async () => {
|
||||
const $pubkey = pubkey.get()
|
||||
|
||||
if ($pubkey) {
|
||||
dropSession($pubkey)
|
||||
}
|
||||
|
||||
localStorage.clear()
|
||||
|
||||
await kv.clear()
|
||||
await db.clear()
|
||||
}
|
||||
|
||||
// Synchronization
|
||||
|
||||
export const broadcastUserData = async (relays: string[]) => {
|
||||
|
||||
+11
-8
@@ -342,9 +342,9 @@ export const notificationSettings = withGetter(
|
||||
push: boolean
|
||||
sound: boolean
|
||||
badge: boolean
|
||||
spaces: boolean,
|
||||
mentions: boolean,
|
||||
messages: boolean,
|
||||
spaces: boolean
|
||||
mentions: boolean
|
||||
messages: boolean
|
||||
token?: string
|
||||
subscription?: {
|
||||
key: string
|
||||
@@ -357,7 +357,7 @@ export const notificationSettings = withGetter(
|
||||
spaces: true,
|
||||
mentions: true,
|
||||
messages: true,
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
// Chats
|
||||
@@ -452,10 +452,13 @@ export const deriveChat = call(() => {
|
||||
})
|
||||
|
||||
export const chatSearch = derived(throttled(800, chatsById), $chatsByPubkey => {
|
||||
return createSearch(Array.from($chatsByPubkey.values()), {
|
||||
getValue: (chat: Chat) => chat.id,
|
||||
fuseOptions: {keys: ["search_text"]},
|
||||
})
|
||||
return createSearch(
|
||||
sortBy(c => -c.last_activity, Array.from($chatsByPubkey.values())),
|
||||
{
|
||||
getValue: (chat: Chat) => chat.id,
|
||||
fuseOptions: {keys: ["search_text"]},
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
// Rooms
|
||||
|
||||
Reference in New Issue
Block a user