Streaming: load messages async

merge-requests/44/head
Alex Gleason 2020-06-04 21:28:19 -05:00
rodzic 956fa99ee1
commit 9e20452692
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -35,7 +35,9 @@ export function connectTimelineStream(timelineId, path, pollingRefresh = null, a
dispatch(deleteFromTimelines(data.payload));
break;
case 'notification':
dispatch(updateNotificationsQueue(JSON.parse(data.payload), messages[locale], locale, window.location.pathname));
messages[locale]().then(messages => {
dispatch(updateNotificationsQueue(JSON.parse(data.payload), messages, locale, window.location.pathname));
}).catch(() => {});
break;
case 'conversation':
dispatch(updateConversations(JSON.parse(data.payload)));