mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 08:21:20 +00:00
fix a few bugs
This commit is contained in:
parent
fa239991ac
commit
c3332be96a
@ -18,7 +18,7 @@
|
||||
const pubkeys = channel.id.split(",") as string[]
|
||||
const displayPubkeys = pubkeys.length === 1 ? pubkeys : without([$pubkey], pubkeys)
|
||||
const showAlert = channels.key(channel.id).derived(channelHasNewMessages)
|
||||
const members = people.mapStore.derived($p => displayPubkeys.map(pk => $p.get(pk)))
|
||||
const members = people.mapStore.derived($p => displayPubkeys.map(pk => $p.get(pk) || {pubkey: pk}))
|
||||
|
||||
const enter = () => router.at("channels").of(pubkeys).push()
|
||||
|
||||
|
@ -22,7 +22,7 @@ export const getStalePubkeys = (pubkeys: Iterable<string>) => {
|
||||
const since = now() - seconds(3, "hour")
|
||||
|
||||
for (const pubkey of pubkeys) {
|
||||
if (!pubkey.match(/^[0-f]{64}$/)) {
|
||||
if (!pubkey?.match(/^[0-f]{64}$/)) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -11,11 +11,17 @@
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
const getClick = e => ({
|
||||
x: e.x || e.touches[0].clientX,
|
||||
y: e.y || e.touches[0].clientY,
|
||||
t: Date.now(),
|
||||
})
|
||||
const getClick = e => {
|
||||
if (!e.touches) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
x: e.x || e.touches[0].clientX,
|
||||
y: e.y || e.touches[0].clientY,
|
||||
t: Date.now(),
|
||||
}
|
||||
}
|
||||
|
||||
const startClick = e => {
|
||||
click = getClick(e)
|
||||
|
Loading…
Reference in New Issue
Block a user