diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-03-13 01:55:14 +0000 |
---|---|---|
committer | Samuel Newman <mozzius@protonmail.com> | 2024-03-13 01:55:14 +0000 |
commit | 125ef1c75610c7add79f6a917bfa058f9265d5d4 (patch) | |
tree | 727ff0713592fc550e77db10ad020b852100eb3e /src/state/queries/notifications | |
parent | 1512b5cf68e9e92801a894392569b444fd6af1d1 (diff) | |
download | voidsky-125ef1c75610c7add79f6a917bfa058f9265d5d4.tar.zst |
Revert "run linter"
This reverts commit 1512b5cf68e9e92801a894392569b444fd6af1d1.
Diffstat (limited to 'src/state/queries/notifications')
-rw-r--r-- | src/state/queries/notifications/feed.ts | 18 | ||||
-rw-r--r-- | src/state/queries/notifications/types.ts | 2 | ||||
-rw-r--r-- | src/state/queries/notifications/unread.tsx | 20 | ||||
-rw-r--r-- | src/state/queries/notifications/util.ts | 18 |
4 files changed, 26 insertions, 32 deletions
diff --git a/src/state/queries/notifications/feed.ts b/src/state/queries/notifications/feed.ts index dbc23fcbd..405d054d4 100644 --- a/src/state/queries/notifications/feed.ts +++ b/src/state/queries/notifications/feed.ts @@ -16,26 +16,24 @@ * 3. Don't call this query's `refetch()` if you're trying to sync latest; call `checkUnread()` instead. */ +import {useEffect, useRef} from 'react' import {AppBskyFeedDefs} from '@atproto/api' import { + useInfiniteQuery, InfiniteData, - QueryClient, QueryKey, - useInfiniteQuery, useQueryClient, + QueryClient, } from '@tanstack/react-query' -import {useEffect, useRef} from 'react' - -import {useMutedThreads} from '#/state/muted-threads' - -import {STALE} from '..' import {useModerationOpts} from '../preferences' -import {embedViewRecordToPostView, getEmbeddedPost} from '../util' -import {FeedPage} from './types' import {useUnreadNotificationsApi} from './unread' import {fetchPage} from './util' +import {FeedPage} from './types' +import {useMutedThreads} from '#/state/muted-threads' +import {STALE} from '..' +import {embedViewRecordToPostView, getEmbeddedPost} from '../util' -export type {FeedNotification, FeedPage, NotificationType} from './types' +export type {NotificationType, FeedNotification, FeedPage} from './types' const PAGE_SIZE = 30 diff --git a/src/state/queries/notifications/types.ts b/src/state/queries/notifications/types.ts index db1cf878f..812236cf0 100644 --- a/src/state/queries/notifications/types.ts +++ b/src/state/queries/notifications/types.ts @@ -1,6 +1,6 @@ import { - AppBskyFeedDefs, AppBskyNotificationListNotifications, + AppBskyFeedDefs, } from '@atproto/api' export type NotificationType = diff --git a/src/state/queries/notifications/unread.tsx b/src/state/queries/notifications/unread.tsx index 2f55872eb..e7a0631ec 100644 --- a/src/state/queries/notifications/unread.tsx +++ b/src/state/queries/notifications/unread.tsx @@ -2,22 +2,20 @@ * A kind of companion API to ./feed.ts. See that file for more info. */ -import {useQueryClient} from '@tanstack/react-query' -import * as Notifications from 'expo-notifications' import React from 'react' -import {AppState} from 'react-native' - +import * as Notifications from 'expo-notifications' +import {useQueryClient} from '@tanstack/react-query' import BroadcastChannel from '#/lib/broadcast' -import {logger} from '#/logger' +import {useSession, getAgent} from '#/state/session' +import {useModerationOpts} from '../preferences' +import {fetchPage} from './util' +import {CachedFeedPage, FeedPage} from './types' import {isNative} from '#/platform/detection' import {useMutedThreads} from '#/state/muted-threads' -import {getAgent, useSession} from '#/state/session' - -import {useModerationOpts} from '../preferences' -import {truncateAndInvalidate} from '../util' import {RQKEY as RQKEY_NOTIFS} from './feed' -import {CachedFeedPage, FeedPage} from './types' -import {fetchPage} from './util' +import {logger} from '#/logger' +import {truncateAndInvalidate} from '../util' +import {AppState} from 'react-native' const UPDATE_INTERVAL = 30 * 1e3 // 30sec diff --git a/src/state/queries/notifications/util.ts b/src/state/queries/notifications/util.ts index f019c8966..626d3e911 100644 --- a/src/state/queries/notifications/util.ts +++ b/src/state/queries/notifications/util.ts @@ -1,21 +1,19 @@ import { - AppBskyEmbedRecord, + AppBskyNotificationListNotifications, + ModerationOpts, + moderateProfile, AppBskyFeedDefs, - AppBskyFeedLike, AppBskyFeedPost, AppBskyFeedRepost, - AppBskyNotificationListNotifications, - moderateProfile, - ModerationOpts, + AppBskyFeedLike, + AppBskyEmbedRecord, } from '@atproto/api' -import {QueryClient} from '@tanstack/react-query' -import chunk from 'lodash.chunk' - import {moderatePost_wrapped as moderatePost} from '#/lib/moderatePost_wrapped' - +import chunk from 'lodash.chunk' +import {QueryClient} from '@tanstack/react-query' import {getAgent} from '../../session' import {precacheProfile} from '../profile' -import {FeedNotification, FeedPage, NotificationType} from './types' +import {NotificationType, FeedNotification, FeedPage} from './types' const GROUPABLE_REASONS = ['like', 'repost', 'follow'] const MS_1HR = 1e3 * 60 * 60 |