From bf9b66bdf478184d0338cde724d919d67a052472 Mon Sep 17 00:00:00 2001 From: pa Date: Wed, 11 Mar 2026 21:38:40 +0900 Subject: [PATCH] fix style --- src/stores/notification/index.js | 68 ++-- .../components/FavoritesFriendItem.vue | 14 +- .../__tests__/FriendsLocationsCard.test.js | 164 ++++++++- src/views/MyAvatars/MyAvatars.vue | 2 +- .../__tests__/ManageTagsDialog.test.js | 136 +++++++ .../MyAvatars/__tests__/MyAvatars.test.js | 341 ++++++++++++++++++ src/views/MyAvatars/columns.jsx | 2 +- .../components/__tests__/MyAvatarCard.test.js | 150 ++++++++ src/views/Tools/Tools.vue | 138 +++---- src/views/Tools/__tests__/Tools.test.js | 65 +++- src/views/Tools/components/ToolItem.vue | 4 +- .../components/__tests__/ToolItem.test.js | 21 +- 12 files changed, 955 insertions(+), 150 deletions(-) create mode 100644 src/views/MyAvatars/__tests__/ManageTagsDialog.test.js create mode 100644 src/views/MyAvatars/__tests__/MyAvatars.test.js create mode 100644 src/views/MyAvatars/components/__tests__/MyAvatarCard.test.js diff --git a/src/stores/notification/index.js b/src/stores/notification/index.js index 2c8b803c..3330f33d 100644 --- a/src/stores/notification/index.js +++ b/src/stores/notification/index.js @@ -437,7 +437,6 @@ export const useNotificationStore = defineStore('Notification', () => { const seeQueue = []; const seenIds = new Set(); let seeProcessing = false; - const SEE_CONCURRENCY = 2; /** * @@ -445,48 +444,43 @@ export const useNotificationStore = defineStore('Notification', () => { async function processSeeQueue() { if (seeProcessing) return; seeProcessing = true; - const worker = async () => { - let item; - while ((item = seeQueue.shift())) { - const { id, version } = item; - try { - await executeWithBackoff( - async () => { - if (version >= 2) { - const args = - await notificationRequest.seeNotificationV2( - { notificationId: id } - ); - handleNotificationV2Update({ - params: { notificationId: id }, - json: { ...args.json, seen: true } - }); - } else { - await notificationRequest.seeNotification({ + let item; + while ((item = seeQueue.shift())) { + const { id, version } = item; + try { + await executeWithBackoff( + async () => { + if (version >= 2) { + const args = + await notificationRequest.seeNotificationV2({ notificationId: id }); - handleNotificationSee(id); - } - }, - { - maxRetries: 3, - baseDelay: 1000, - shouldRetry: (err) => - err?.status === 429 || - (err?.message || '').includes('429') + handleNotificationV2Update({ + params: { notificationId: id }, + json: { ...args.json, seen: true } + }); + } else { + await notificationRequest.seeNotification({ + notificationId: id + }); + handleNotificationSee(id); } - ); - } catch (err) { - console.warn('Failed to mark notification as seen:', id); - if (version >= 2) { - handleNotificationV2Hide(id); + }, + { + maxRetries: 3, + baseDelay: 1000, + shouldRetry: (err) => + err?.status === 429 || + (err?.message || '').includes('429') } + ); + } catch (err) { + console.warn('Failed to mark notification as seen:', id); + if (version >= 2) { + handleNotificationV2Hide(id); } } - }; - await Promise.all( - Array.from({ length: SEE_CONCURRENCY }, () => worker()) - ); + } seeProcessing = false; } diff --git a/src/views/Favorites/components/FavoritesFriendItem.vue b/src/views/Favorites/components/FavoritesFriendItem.vue index 19dd70eb..a0d2f399 100644 --- a/src/views/Favorites/components/FavoritesFriendItem.vue +++ b/src/views/Favorites/components/FavoritesFriendItem.vue @@ -11,7 +11,7 @@ {{ displayName }} - +