Don't just put "null" in the notifications list, fixes #432

chats-push-2
Alex Gleason 2020-09-23 10:14:27 -05:00
rodzic e8a9737fc9
commit 4851ec24f9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 10 dodań i 6 usunięć

Wyświetl plik

@ -155,12 +155,16 @@ export default function notifications(state = initialState, action) {
return state.set('lastRead', action.lastRead); return state.set('lastRead', action.lastRead);
case TIMELINE_DELETE: case TIMELINE_DELETE:
return deleteByStatus(state, action.id); return deleteByStatus(state, action.id);
case TIMELINE_DISCONNECT:
// This is kind of a hack - `null` renders a LoadGap in the component // Disable for now
// https://github.com/tootsuite/mastodon/pull/6886 // https://gitlab.com/soapbox-pub/soapbox-fe/-/issues/432
return action.timeline === 'home' ? //
state.update('items', items => items.first() ? ImmutableOrderedSet([null]).union(items) : items) : // case TIMELINE_DISCONNECT:
state; // // This is kind of a hack - `null` renders a LoadGap in the component
// // https://github.com/tootsuite/mastodon/pull/6886
// return action.timeline === 'home' ?
// state.update('items', items => items.first() ? ImmutableOrderedSet([null]).union(items) : items) :
// state;
default: default:
return state; return state;
} }