Disable zaps on ios

This commit is contained in:
Jon Staab
2025-07-17 14:39:59 -07:00
parent 79de2e1176
commit 037c8cb41b
10 changed files with 36 additions and 44 deletions
@@ -12,8 +12,6 @@
makeRoomMeta,
MESSAGE,
DELETE,
REACTION,
ZAP_RESPONSE,
ROOM_ADD_USER,
ROOM_REMOVE_USER,
} from "@welshman/util"
@@ -38,6 +36,7 @@
deriveUserMembershipStatus,
deriveChannel,
MembershipStatus,
REACTION_KINDS,
} from "@app/state"
import {setChecked, checked} from "@app/notifications"
import {addRoomMembership, removeRoomMembership, prependParent} from "@app/commands"
@@ -228,7 +227,7 @@
relays: [url],
feedFilters: [filter],
subscriptionFilters: [
{kinds: [DELETE, REACTION, ZAP_RESPONSE, MESSAGE], "#h": [room], since: now()},
{kinds: [DELETE, MESSAGE, ...REACTION_KINDS], "#h": [room], since: now()},
],
initialEvents: getEventsForUrl(url, [{...filter, limit: 20}]),
onExhausted: () => {
@@ -5,7 +5,7 @@
import {page} from "$app/stores"
import {now, last, formatTimestampAsDate} from "@welshman/lib"
import type {TrustedEvent} from "@welshman/util"
import {REACTION, ZAP_RESPONSE, DELETE, EVENT_TIME, getTagValue} from "@welshman/util"
import {DELETE, EVENT_TIME, getTagValue} from "@welshman/util"
import {fly} from "@lib/transition"
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
@@ -17,7 +17,7 @@
import CalendarEventItem from "@app/components/CalendarEventItem.svelte"
import CalendarEventCreate from "@app/components/CalendarEventCreate.svelte"
import {pushModal} from "@app/modal"
import {getEventsForUrl, decodeRelay} from "@app/state"
import {getEventsForUrl, decodeRelay, REACTION_KINDS} from "@app/state"
import {makeCalendarFeed} from "@app/requests"
import {setChecked} from "@app/notifications"
@@ -93,9 +93,7 @@
onMount(() => {
const feedFilters = [{kinds: [EVENT_TIME]}]
const subscriptionFilters = [
{kinds: [DELETE, REACTION, ZAP_RESPONSE, EVENT_TIME], since: now()},
]
const subscriptionFilters = [{kinds: [DELETE, EVENT_TIME, ...REACTION_KINDS], since: now()}]
;({events, cleanup} = makeCalendarFeed({
element: element!,
+3 -3
View File
@@ -5,7 +5,7 @@
import type {Readable} from "svelte/store"
import {now, formatTimestampAsDate} from "@welshman/lib"
import type {TrustedEvent, EventContent} from "@welshman/util"
import {makeEvent, MESSAGE, DELETE, REACTION, ZAP_RESPONSE} from "@welshman/util"
import {makeEvent, MESSAGE, DELETE} from "@welshman/util"
import {pubkey, publishThunk} from "@welshman/app"
import {slide, fade, fly} from "@lib/transition"
import Icon from "@lib/components/Icon.svelte"
@@ -21,7 +21,7 @@
import {userSettingValues, decodeRelay, getEventsForUrl} from "@app/state"
import {setChecked, checked} from "@app/notifications"
import {prependParent} from "@app/commands"
import {PROTECTED} from "@app/state"
import {PROTECTED, REACTION_KINDS} from "@app/state"
import {makeFeed} from "@app/requests"
import {popKey} from "@app/implicit"
@@ -174,7 +174,7 @@
element: element!,
relays: [url],
feedFilters: [filter],
subscriptionFilters: [{kinds: [DELETE, REACTION, ZAP_RESPONSE, MESSAGE], since: now()}],
subscriptionFilters: [{kinds: [DELETE, MESSAGE, ...REACTION_KINDS], since: now()}],
initialEvents: getEventsForUrl(url, [{...filter, limit: 20}]),
onExhausted: () => {
loadingEvents = false
+3 -11
View File
@@ -3,15 +3,7 @@
import {page} from "$app/stores"
import {sortBy, max, nthEq} from "@welshman/lib"
import type {TrustedEvent} from "@welshman/util"
import {
ZAP_GOAL,
REACTION,
ZAP_RESPONSE,
DELETE,
COMMENT,
getListTags,
getPubkeyTagValues,
} from "@welshman/util"
import {ZAP_GOAL, DELETE, COMMENT, getListTags, getPubkeyTagValues} from "@welshman/util"
import {userMutes} from "@welshman/app"
import {fly} from "@lib/transition"
import Icon from "@lib/components/Icon.svelte"
@@ -22,7 +14,7 @@
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
import GoalItem from "@app/components/GoalItem.svelte"
import GoalCreate from "@app/components/GoalCreate.svelte"
import {decodeRelay, getEventsForUrl} from "@app/state"
import {decodeRelay, getEventsForUrl, REACTION_KINDS} from "@app/state"
import {setChecked} from "@app/notifications"
import {makeFeed} from "@app/requests"
import {pushModal} from "@app/modal"
@@ -57,7 +49,7 @@
relays: [url],
feedFilters: [{kinds: [ZAP_GOAL, COMMENT]}],
subscriptionFilters: [
{kinds: [ZAP_GOAL, REACTION, ZAP_RESPONSE, DELETE]},
{kinds: [ZAP_GOAL, DELETE, ...REACTION_KINDS]},
{kinds: [COMMENT], "#K": [String(ZAP_GOAL)]},
],
initialEvents: getEventsForUrl(url, [{kinds: [ZAP_GOAL, COMMENT], limit: 10}]),
+3 -10
View File
@@ -3,15 +3,7 @@
import {page} from "$app/stores"
import {sortBy, max, nthEq} from "@welshman/lib"
import type {TrustedEvent} from "@welshman/util"
import {
THREAD,
REACTION,
ZAP_RESPONSE,
DELETE,
COMMENT,
getListTags,
getPubkeyTagValues,
} from "@welshman/util"
import {THREAD, DELETE, COMMENT, getListTags, getPubkeyTagValues} from "@welshman/util"
import {userMutes} from "@welshman/app"
import {fly} from "@lib/transition"
import Icon from "@lib/components/Icon.svelte"
@@ -24,6 +16,7 @@
import ThreadCreate from "@app/components/ThreadCreate.svelte"
import {decodeRelay, getEventsForUrl} from "@app/state"
import {setChecked} from "@app/notifications"
import {REACTION_KINDS} from "@app/state"
import {makeFeed} from "@app/requests"
import {pushModal} from "@app/modal"
@@ -57,7 +50,7 @@
relays: [url],
feedFilters: [{kinds: [THREAD, COMMENT]}],
subscriptionFilters: [
{kinds: [THREAD, REACTION, ZAP_RESPONSE, DELETE]},
{kinds: [THREAD, DELETE, ...REACTION_KINDS]},
{kinds: [COMMENT], "#K": [String(THREAD)]},
],
initialEvents: getEventsForUrl(url, [{kinds: [THREAD, COMMENT], limit: 10}]),