Don't remove status immediately

It'll be too abrupt. Set `_deleted` flag for now, no UI yet.
This commit is contained in:
Lim Chee Aun 2022-12-22 22:43:04 +08:00
parent 37c44c2264
commit 5944b4fe30
2 changed files with 4 additions and 1 deletions

View file

@ -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);

View file

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