diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.js b/src/components/who_to_follow_panel/who_to_follow_panel.js index 0f7f93556..bd0eaf5e1 100644 --- a/src/components/who_to_follow_panel/who_to_follow_panel.js +++ b/src/components/who_to_follow_panel/who_to_follow_panel.js @@ -30,7 +30,7 @@ function showWhoToFollow(panel, reply) { }) } -function getWhoToFollow() { +function getWhoToFollow(panel) { const credentials = useOAuthStore().token if (credentials) { panel.usersToFollow.forEach((toFollow) => { diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js index 41038573d..f7877be15 100644 --- a/src/services/status_poster/status_poster.service.js +++ b/src/services/status_poster/status_poster.service.js @@ -1,8 +1,8 @@ import { map } from 'lodash' +import { useOAuthStore } from 'src/stores/oauth.js' import { useStatusesStore } from 'src/stores/statuses.js' import { useTimelinesStore } from 'src/stores/timelines.js' -import { useOAuthStore } from 'src/stores/oauth.js' import { editStatus as apiEditStatus, diff --git a/src/stores/chats.js b/src/stores/chats.js index 82bb638dd..2f7d4f0b6 100644 --- a/src/stores/chats.js +++ b/src/stores/chats.js @@ -81,8 +81,6 @@ export const useChatsStore = defineStore('chats', { const chat = getChatById(this, updatedChat.id) if (chat) { - const isNewMessage = - chat.lastMessage?.id !== updatedChat.lastMessage?.id chat.lastMessage = updatedChat.lastMessage chat.unread = updatedChat.unread chat.updated_at = updatedChat.updated_at diff --git a/src/stores/instance.js b/src/stores/instance.js index 12480e8c1..0d1da35d0 100644 --- a/src/stores/instance.js +++ b/src/stores/instance.js @@ -13,7 +13,6 @@ import { } from '../modules/default_config_state.js' import { useInterfaceStore } from 'src/stores/interface.js' -import { useUsersStore } from 'src/stores/users.js' import { useOAuthStore } from 'src/stores/oauth.js' import { fetchKnownDomains } from 'src/api/public.js' @@ -214,7 +213,7 @@ export const useInstanceStore = defineStore('instance', { async getKnownDomains() { try { const { data } = await fetchKnownDomains({ - credentials: useOAuthStore().token + credentials: useOAuthStore().token, }) this.knownDomains = data } catch (e) { diff --git a/src/stores/notifications.js b/src/stores/notifications.js index 3405fb352..4f18ccc21 100644 --- a/src/stores/notifications.js +++ b/src/stores/notifications.js @@ -94,7 +94,7 @@ export const useNotificationsStore = defineStore('notifications', { Object.keys(blankState).forEach((k) => { this[k] = blankState[k] }) - console.log('[Notifications] Deactivated', this.fetcher) + console.debug('[Notifications] Deactivated', this.fetcher) }, // Poll & Push diff --git a/src/stores/statuses.js b/src/stores/statuses.js index 337cb399d..11a5b81bc 100644 --- a/src/stores/statuses.js +++ b/src/stores/statuses.js @@ -149,7 +149,9 @@ export const useStatusesStore = defineStore('statuses', { const newStatus = { ...old, - ...Object.fromEntries(Object.entries(neu).filter(([, v]) => v !== undefined)), + ...Object.fromEntries( + Object.entries(neu).filter(([, v]) => v !== undefined), + ), user, } diff --git a/src/stores/timelines.js b/src/stores/timelines.js index 190396f48..99864b162 100644 --- a/src/stores/timelines.js +++ b/src/stores/timelines.js @@ -183,10 +183,7 @@ export const useTimelinesStore = defineStore('timelines', { pause(name) { const timeline = this[name] timeline.paused = true - console.debug( - '[Timelines] Pausing timeline', - name, - ) + console.debug('[Timelines] Pausing timeline', name) if (timeline.fetcher && timeline.fetching) { timeline.fetcher.stopFetching() } @@ -194,10 +191,7 @@ export const useTimelinesStore = defineStore('timelines', { resume(name) { const timeline = this[name] timeline.paused = false - console.debug( - '[Timelines] Resuming timeline', - name, - ) + console.debug('[Timelines] Resuming timeline', name) if (timeline.fetcher && timeline.fetching) { timeline.fetcher.startFetching() } @@ -286,13 +280,11 @@ export const useTimelinesStore = defineStore('timelines', { this.stopFetchingTimeline(timeline, 'Socket connected') }, onStreamDisconnect(timeline, argument) { - console.debug('[Timelines] Stream disconnected', timeline, argument) this[timeline].streaming = false this.startFetchingTimeline(timeline, argument, 'Socket disconnected') }, startFetchingTimeline(timelineName, argument, reason) { const timeline = this[timelineName] - console.log('[Timelines]', toValue(timeline)) if (timeline.paused) { console.debug( '[Timelines] NOT Starting timeline fetcher because it is paused', diff --git a/src/stores/users.js b/src/stores/users.js index 9b824bf04..2a88e9295 100644 --- a/src/stores/users.js +++ b/src/stores/users.js @@ -2,8 +2,6 @@ import Cookies from 'js-cookie' import { last } from 'lodash' import { defineStore } from 'pinia' -import { WSConnectionStatus } from 'src/api/websocket.js' - import { useAnnouncementsStore } from 'src/stores/announcements.js' import { useBookmarkFoldersStore } from 'src/stores/bookmark_folders.js' import { useChatsStore } from 'src/stores/chats.js' @@ -46,6 +44,7 @@ import { unmuteDomain, unmuteUser, } from 'src/api/user.js' +import { WSConnectionStatus } from 'src/api/websocket.js' import { promiseInterval } from 'src/services/promise_interval/promise_interval.js' export const useUsersStore = defineStore('users', { @@ -755,8 +754,8 @@ export const useUsersStore = defineStore('users', { // Socket is most likely already closed by server if ( - useMergedConfigStore().mergedConfig.useStreamingApi - && useStreamingStore().state !== WSConnectionStatus.CLOSED + useMergedConfigStore().mergedConfig.useStreamingApi && + useStreamingStore().state !== WSConnectionStatus.CLOSED ) { useStreamingStore().stopSocket() }