summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Beck <davbeck@users.noreply.github.com>2024-04-29 00:55:58 -0700
committerGitHub <noreply@github.com>2024-04-29 07:55:58 +0000
commit4f4b77920eeb3ba65346862d489945494dfeab64 (patch)
tree1e5283114488d9bb6de4eb303789679c16bb4312
parent7201f99cf83a74331febd1624ca9aaace68af5e6 (diff)
Remove home marker updates (#22721)
-rw-r--r--app/javascript/mastodon/actions/markers.ts22
1 files changed, 0 insertions, 22 deletions
diff --git a/app/javascript/mastodon/actions/markers.ts b/app/javascript/mastodon/actions/markers.ts
index 6ecc867169f..91f78ee2867 100644
--- a/app/javascript/mastodon/actions/markers.ts
+++ b/app/javascript/mastodon/actions/markers.ts
@@ -1,5 +1,3 @@
-import { List as ImmutableList } from 'immutable';
-
import { debounce } from 'lodash';
import type { MarkerJSON } from 'mastodon/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 &&
compareId(lastNotificationId, state.markers.notifications) > 0