add notification modal

This commit is contained in:
Ren Amamiya
2023-07-03 15:23:31 +07:00
parent 6f29df112b
commit 861b04100a
9 changed files with 235 additions and 105 deletions

View File

@@ -50,7 +50,7 @@ export function ActiveAccount({ data }: { data: any }) {
const since = lastLogin > 0 ? lastLogin : Math.floor(Date.now() / 1000);
const sub = ndk.subscribe(
{
kinds: [1, 4],
kinds: [4],
"#p": [data.pubkey],
since: since,
},
@@ -61,10 +61,6 @@ export function ActiveAccount({ data }: { data: any }) {
sub.addListener("event", (event) => {
switch (event.kind) {
case 1:
// send native notifiation
sendNativeNotification("Someone mention you");
break;
case 4:
// update state
chat.mutate({