fix(frontend/MkNotifications): 通知が複数回表示されてしまう問題を修正 (MisskeyIO#212)

This commit is contained in:
まっちゃとーにゅ 2023-11-06 23:58:47 +09:00 committed by GitHub
parent 48042557c2
commit e794231097
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onUnmounted, onActivated, onMounted, computed, shallowRef } from 'vue'; import { onMounted, onActivated, onUnmounted, onDeactivated, computed, shallowRef } from 'vue';
import MkPagination, { Paging } from '@/components/MkPagination.vue'; import MkPagination, { Paging } from '@/components/MkPagination.vue';
import MkPullToRefresh from '@/components/MkPullToRefresh.vue'; import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
import XNotification from '@/components/MkNotification.vue'; import XNotification from '@/components/MkNotification.vue';
@ -86,6 +86,10 @@ onActivated(() => {
onUnmounted(() => { onUnmounted(() => {
if (connection) connection.dispose(); if (connection) connection.dispose();
}); });
onDeactivated(() => {
if (connection) connection.dispose();
});
</script> </script>
<style lang="scss" module> <style lang="scss" module>