Skip to content
Snippets Groups Projects

Fixed sharkey randomly clearing notifications

Open Leah requested to merge bug/fixing-random-notification-clearing into develop
2 unresolved threads
1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
@@ -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';
    • Developer

      could you put this back here? unless there's a very good reason, we'd like to stay as close as upstream as possible!

      • Author Contributor

        Hmm it seems it autoformats back up there on save. It would seem this is due to the project config?

      • Author Contributor

        Other than that is this PR fine then?

      • have you checked that the behaviours I pointed out in my other comments don't make the clearing even more random?

      • Author Contributor

        From my tests it seems less random. Are there any specific tests I should try? Its a bit hard to test on a local instance where I don't get a lot of notifications so I'm sending a lot of test notifications. But also telling it to not clear in this case would only make it clear less not more randomly

      • Please register or sign in to reply
Please register or sign in to reply
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,
})),
});
Loading