Don't remove status immediately

It'll be too abrupt. Set `_deleted` flag for now, no UI yet.
pull/20/head
Lim Chee Aun 2022-12-22 22:43:04 +08:00
rodzic 37c44c2264
commit 5944b4fe30
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -56,7 +56,9 @@ async function startStream() {
});
stream.on('delete', (statusID) => {
console.log('DELETE', statusID);
states.statuses.delete(statusID);
// states.statuses.delete(statusID);
const s = states.statuses.get(statusID);
if (s) s._deleted = true;
});
stream.on('notification', (notification) => {
console.log('NOTIFICATION', notification);

Wyświetl plik

@ -99,6 +99,7 @@ function Status({
reblog,
uri,
emojis,
_deleted,
} = status;
const createdAtDate = new Date(createdAt);