mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-31 14:31:43 +01:00
[Glitch] Fix home TL marker code mishandling gaps
Port eaea2311aaaf030e4a2f5d03be6131d0716fdaf7 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
parent
4586202448
commit
572d1a1bf8
@ -60,7 +60,7 @@ export const synchronouslySubmitMarkers = () => (dispatch, getState) => {
|
|||||||
const _buildParams = (state) => {
|
const _buildParams = (state) => {
|
||||||
const params = {};
|
const params = {};
|
||||||
|
|
||||||
const lastHomeId = state.getIn(['timelines', 'home', 'items', 0]);
|
const lastHomeId = state.getIn(['timelines', 'home', 'items']).find(item => item !== null);
|
||||||
const lastNotificationId = state.getIn(['notifications', 'lastReadId']);
|
const lastNotificationId = state.getIn(['notifications', 'lastReadId']);
|
||||||
|
|
||||||
if (lastHomeId && compareId(lastHomeId, state.getIn(['markers', 'home'])) > 0) {
|
if (lastHomeId && compareId(lastHomeId, state.getIn(['markers', 'home'])) > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user