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

* Revert "fix(frontend/MkNotifications): 通知が複数回表示されてしまう問題を修正 (MisskeyIO#212)"
This reverts commit e794231097.

* fix(frontend/MkNotifications): 通知が複数回表示されてしまう問題を修正
This commit is contained in:
まっちゃとーにゅ 2023-11-07 02:32:09 +09:00 committed by GitHub
parent ec5e1df9f5
commit 7b8810c900
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, onActivated, onUnmounted, onDeactivated, computed, shallowRef } from 'vue'; import { onUnmounted, onActivated, onMounted, 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';
@ -79,17 +79,11 @@ onMounted(() => {
onActivated(() => { onActivated(() => {
pagingComponent.value?.reload(); pagingComponent.value?.reload();
connection = useStream().useChannel('main');
connection.on('notification', onNotification);
}); });
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>