Don't remove status immediately
It'll be too abrupt. Set `_deleted` flag for now, no UI yet.
This commit is contained in:
parent
37c44c2264
commit
5944b4fe30
2 changed files with 4 additions and 1 deletions
|
@ -56,7 +56,9 @@ async function startStream() {
|
||||||
});
|
});
|
||||||
stream.on('delete', (statusID) => {
|
stream.on('delete', (statusID) => {
|
||||||
console.log('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) => {
|
stream.on('notification', (notification) => {
|
||||||
console.log('NOTIFICATION', notification);
|
console.log('NOTIFICATION', notification);
|
||||||
|
|
|
@ -99,6 +99,7 @@ function Status({
|
||||||
reblog,
|
reblog,
|
||||||
uri,
|
uri,
|
||||||
emojis,
|
emojis,
|
||||||
|
_deleted,
|
||||||
} = status;
|
} = status;
|
||||||
|
|
||||||
const createdAtDate = new Date(createdAt);
|
const createdAtDate = new Date(createdAt);
|
||||||
|
|
Loading…
Add table
Reference in a new issue