merge: Fixed sharkey randomly clearing notifications (!473)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/473
This commit is contained in:
Leah 2024-04-12 04:34:35 +00:00
commit 46ec184374

View file

@ -29,6 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { onUnmounted, onDeactivated, onMounted, computed, shallowRef, onActivated } from 'vue';
import * as Misskey from 'misskey-js';
import MkPagination from '@/components/MkPagination.vue';
import XNotification from '@/components/MkNotification.vue';
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
@ -40,7 +41,6 @@ import { notificationTypes } from '@/const.js';
import { infoImageUrl } from '@/instance.js';
import { defaultStore } from '@/store.js';
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
import * as Misskey from 'misskey-js';
const props = defineProps<{
excludeTypes?: typeof notificationTypes[number][];
@ -52,12 +52,14 @@ const pagination = computed(() => defaultStore.reactiveState.useGroupedNotificat
endpoint: 'i/notifications-grouped' as const,
limit: 20,
params: computed(() => ({
markAsRead: false,
excludeTypes: props.excludeTypes ?? undefined,
})),
} : {
endpoint: 'i/notifications' as const,
limit: 20,
params: computed(() => ({
markAsRead: false,
excludeTypes: props.excludeTypes ?? undefined,
})),
});