mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-09-20 10:06:32 +00:00
fix
This commit is contained in:
parent
6e74604cd7
commit
5269dccb08
@ -774,6 +774,7 @@ export default {
|
||||
// only handle one boost per post per user. TODO update with newer event if needed.
|
||||
if (!this.boostsByMessageId.get(id)?.has(event.pubkey)) {
|
||||
this.boostsByMessageId.get(id)?.add(event.pubkey);
|
||||
this.handleNote(event);
|
||||
}
|
||||
},
|
||||
handleReaction(event: Event) {
|
||||
@ -937,6 +938,9 @@ export default {
|
||||
}
|
||||
},
|
||||
updateUnseenNotificationCount: debounce((_this) => {
|
||||
if (!_this.notificationsSeenTime) {
|
||||
return;
|
||||
}
|
||||
let count = 0;
|
||||
for (const id of _this.notifications.eventIds) {
|
||||
const event = _this.eventsById.get(id);
|
||||
@ -1179,8 +1183,8 @@ export default {
|
||||
this.public.get({ path: 'notifications/lastOpened', authors: [myPub] }, (time) => {
|
||||
time = time.value;
|
||||
if (time !== this.notificationsSeenTime) {
|
||||
localForage.setItem('notificationsSeenTime', time.value);
|
||||
this.notificationsSeenTime = time.value;
|
||||
this.notificationsSeenTime = time;
|
||||
localForage.setItem('notificationsSeenTime', time);
|
||||
this.updateUnseenNotificationCount(this);
|
||||
}
|
||||
});
|
||||
|
@ -10,6 +10,7 @@ import iris from 'iris-lib';
|
||||
import _ from 'lodash';
|
||||
import { route } from 'preact-router';
|
||||
import Nostr from "../Nostr";
|
||||
import localForage from "localforage";
|
||||
const bech32 = require('bech32-buffer');
|
||||
|
||||
function maybeGoToChat(key) {
|
||||
@ -118,6 +119,9 @@ class Login extends Component {
|
||||
}, 100);
|
||||
// follow the developer's nostr key also
|
||||
this.base.style = 'display:none';
|
||||
const now = Math.floor(Date.now() / 1000);
|
||||
Nostr.notificationsSeenTime = now;
|
||||
localForage.setItem('notificationsSeenTime', now);
|
||||
}
|
||||
|
||||
onNameChange(event) {
|
||||
|
Loading…
Reference in New Issue
Block a user