Switch wording to messaging from inbox

This commit is contained in:
Jon Staab
2025-11-20 15:12:16 -08:00
parent 1d272f8b37
commit 3a63894562
21 changed files with 149 additions and 169 deletions
+7 -15
View File
@@ -20,9 +20,9 @@ import {
getUrlsForEvent,
repositoryStore,
userSettingsValues,
userGroupSelections,
getSpaceUrlsFromGroupSelections,
getSpaceRoomsFromGroupSelections,
userGroupList,
getSpaceUrlsFromGroupList,
getSpaceRoomsFromGroupList,
} from "@app/core/state"
import {kv} from "@app/core/storage"
@@ -44,19 +44,11 @@ export const notifications = derived(
throttled(
1000,
derived(
[pubkey, checked, chats, userGroupSelections, repositoryStore, getUrlsForEvent, relaysByUrl],
[pubkey, checked, chats, userGroupList, repositoryStore, getUrlsForEvent, relaysByUrl],
identity,
),
),
([
$pubkey,
$checked,
$chats,
$userGroupSelections,
$repository,
$getUrlsForEvent,
$relaysByUrl,
]) => {
([$pubkey, $checked, $chats, $userGroupList, $repository, $getUrlsForEvent, $relaysByUrl]) => {
const hasNotification = (path: string, latestEvent: TrustedEvent | undefined) => {
if (!latestEvent || latestEvent.pubkey === $pubkey) {
return false
@@ -95,7 +87,7 @@ export const notifications = derived(
const allMessages = $repository.query([{kinds: [MESSAGE, THREAD, ZAP_GOAL, EVENT_TIME]}])
for (const url of getSpaceUrlsFromGroupSelections($userGroupSelections)) {
for (const url of getSpaceUrlsFromGroupList($userGroupList)) {
const spacePath = makeSpacePath(url)
const spacePathMobile = spacePath + ":mobile"
const goalPath = makeGoalPath(url)
@@ -171,7 +163,7 @@ export const notifications = derived(
}
if (hasNip29($relaysByUrl.get(url))) {
for (const h of getSpaceRoomsFromGroupSelections(url, $userGroupSelections)) {
for (const h of getSpaceRoomsFromGroupList(url, $userGroupList)) {
const roomPath = makeRoomPath(url, h)
const latestEvent = messages.find(e => e.tags.some(spec(["h", h])))
+2 -2
View File
@@ -12,7 +12,7 @@ import {
DIRECT_MESSAGE,
EVENT_TIME,
FOLLOWS,
INBOX_RELAYS,
MESSAGING_RELAYS,
MESSAGE,
MUTES,
PROFILE,
@@ -54,7 +54,7 @@ import {isMobile} from "@lib/html"
import type {IDBTable} from "@lib/indexeddb"
const kinds = {
meta: [PROFILE, FOLLOWS, MUTES, RELAYS, BLOSSOM_SERVERS, INBOX_RELAYS, APP_DATA, ROOMS],
meta: [PROFILE, FOLLOWS, MUTES, RELAYS, BLOSSOM_SERVERS, MESSAGING_RELAYS, APP_DATA, ROOMS],
alert: [ALERT_STATUS, ALERT_EMAIL, ALERT_WEB, ALERT_IOS, ALERT_ANDROID],
space: [RELAY_ADD_MEMBER, RELAY_REMOVE_MEMBER, RELAY_MEMBERS, RELAY_JOIN, RELAY_LEAVE],
room: [