From defd1e4024ffb89b8dbcc82fb7384903cd2c3e79 Mon Sep 17 00:00:00 2001 From: David Beck Date: Mon, 29 Apr 2024 00:55:58 -0700 Subject: [PATCH] [Glitch] Remove home marker updates Port 4f4b77920eeb3ba65346862d489945494dfeab64 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/actions/markers.ts | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/app/javascript/flavours/glitch/actions/markers.ts b/app/javascript/flavours/glitch/actions/markers.ts index 8fc7d1fb40..3f810cf99a 100644 --- a/app/javascript/flavours/glitch/actions/markers.ts +++ b/app/javascript/flavours/glitch/actions/markers.ts @@ -1,5 +1,3 @@ -import { List as ImmutableList } from 'immutable'; - import { debounce } from 'lodash'; import type { MarkerJSON } from 'flavours/glitch/api_types/markers'; @@ -71,19 +69,6 @@ interface MarkerParam { last_read_id?: string; } -function getLastHomeId(state: RootState): string | undefined { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return ( - // eslint-disable-next-line @typescript-eslint/no-unsafe-call - state - // @ts-expect-error state.timelines is not yet typed - .getIn(['timelines', 'home', 'items'], ImmutableList()) - // @ts-expect-error state.timelines is not yet typed - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - .find((item) => item !== null) - ); -} - function getLastNotificationId(state: RootState): string | undefined { // @ts-expect-error state.notifications is not yet typed // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call @@ -93,15 +78,8 @@ function getLastNotificationId(state: RootState): string | undefined { const buildPostMarkersParams = (state: RootState) => { const params = {} as { home?: MarkerParam; notifications?: MarkerParam }; - const lastHomeId = getLastHomeId(state); const lastNotificationId = getLastNotificationId(state); - if (lastHomeId && compareId(lastHomeId, state.markers.home) > 0) { - params.home = { - last_read_id: lastHomeId, - }; - } - if ( lastNotificationId && lastNotificationId !== '0' &&