fix(frontend/MkNotifications): 通知が複数回表示されてしまう問題を修正 (MisskeyIO#215)
* Revert "fix(frontend/MkNotifications): 通知が複数回表示されてしまう問題を修正 (MisskeyIO#212)"
This reverts commit e794231097
.
* fix(frontend/MkNotifications): 通知が複数回表示されてしまう問題を修正
This commit is contained in:
parent
ec5e1df9f5
commit
7b8810c900
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue