enhance: 通知の履歴をリセットできるように (#13335)
* enhance: 通知の履歴をリセットできるように * Update Changelog * 通知欄も連動して更新するように * revert some changes * Update CHANGELOG.md * Remove unused part * fix
This commit is contained in:
		| @@ -35,6 +35,7 @@ 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][]; | ||||
| @@ -75,17 +76,19 @@ function reload() { | ||||
| 	}); | ||||
| } | ||||
|  | ||||
| let connection; | ||||
| let connection: Misskey.ChannelConnection<Misskey.Channels['main']>; | ||||
|  | ||||
| onMounted(() => { | ||||
| 	connection = useStream().useChannel('main'); | ||||
| 	connection.on('notification', onNotification); | ||||
| 	connection.on('notificationFlushed', reload); | ||||
| }); | ||||
|  | ||||
| onActivated(() => { | ||||
| 	pagingComponent.value?.reload(); | ||||
| 	connection = useStream().useChannel('main'); | ||||
| 	connection.on('notification', onNotification); | ||||
| 	connection.on('notificationFlushed', reload); | ||||
| }); | ||||
|  | ||||
| onUnmounted(() => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 かっこかり
					かっこかり