Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7322711

Browse files
authored
fix: subscribe to proper user.notification stream (#2566)
1 parentb8e8693 commit7322711

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

‎components/common/CommonPaginator.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ const {
1010
stream,
1111
keyProp='id',
1212
virtualScroller=false,
13-
eventType='update',
1413
preprocess,
1514
endMessage=true,
1615
}=defineProps<{
1716
paginator:mastodon.Paginator<T[],O>
1817
keyProp?:keyofT
1918
virtualScroller?:boolean
2019
stream?:mastodon.streaming.Subscription
21-
eventType?:'notification'|'update'
2220
preprocess?: (items: (U|T)[])=>U[]
2321
endMessage?:boolean|string
2422
}>()
@@ -46,7 +44,7 @@ defineSlots<{
4644
const { t }=useI18n()
4745
const nuxtApp=useNuxtApp()
4846
49-
const { items, prevItems, update, state, endAnchor, error }=usePaginator(paginator,$$(stream),eventType,preprocess)
47+
const { items, prevItems, update, state, endAnchor, error }=usePaginator(paginator,$$(stream),preprocess)
5048
5149
nuxtApp.hook('elk-logo:click', ()=> {
5250
update()

‎components/notification/NotificationPaginator.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ const { formatNumber } = useHumanReadableNumber()
172172
:preprocess="preprocess"
173173
:stream="stream"
174174
:virtualScroller="virtualScroller"
175-
eventType="notification"
176175
>
177176
<template #updater="{number,update }">
178177
<buttonpy-4border="b base"flex="~ col"p-3w-fulltext-primaryfont-bold@click="() => { update(); clearNotifications() }">

‎components/timeline/TimelineNotifications.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const options = { limit: 30, types: filter ? [filter] : [] }
99
1010
// Default limit is 20 notifications, and servers are normally caped to 30
1111
const paginator=useMastoClient().v1.notifications.list(options)
12-
const stream=useStreaming(client=>client.user.subscribe())
12+
const stream=useStreaming(client=>client.user.notification.subscribe())
1313
1414
const { clearNotifications }=useNotifications()
1515
onActivated(clearNotifications)

‎composables/paginator.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { PaginatorState } from '~/types'
55
exportfunctionusePaginator<T,P,U=T>(
66
_paginator:mastodon.Paginator<T[],P>,
77
stream:Ref<mastodon.streaming.Subscription|undefined>,
8-
eventType:'notification'|'update'='update',
98
preprocess:(items:(T|U)[])=>U[]=items=>itemsasunknownasU[],
109
buffer=10,
1110
){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp