Skip to content

Commit

Permalink
Rename to Mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Dec 11, 2024
1 parent a88cd54 commit 113db45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/state/queries/notifications/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ const PAGE_SIZE = 30
type RQPageParam = string | undefined

const RQKEY_ROOT = 'notification-feed'
export function RQKEY(group: 'all' | 'conversations') {
export function RQKEY(group: 'all' | 'mentions') {
return [RQKEY_ROOT, group]
}

export function useNotificationFeedQuery(opts: {
enabled?: boolean
filterTab: 'all' | 'conversations'
filterTab: 'all' | 'mentions'
}) {
const agent = useAgent()
const queryClient = useQueryClient()
Expand Down Expand Up @@ -97,7 +97,7 @@ export function useNotificationFeedQuery(opts: {
}
if (!page) {
let filter: string[] = []
if (filterTab === 'conversations') {
if (filterTab === 'mentions') {
filter = [
// Anything that's a post
'mention',
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/notifications/NotificationFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function NotificationFeed({
ListHeaderComponent,
refreshNotifications,
}: {
filterTab: 'all' | 'conversations'
filterTab: 'all' | 'mentions'
scrollElRef?: ListRef
onPressTryAgain?: () => void
onScrolledDownChange: (isScrolledDown: boolean) => void
Expand Down
8 changes: 4 additions & 4 deletions src/view/screens/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function NotificationsScreen({}: Props) {
const checkUnreadConversations = React.useCallback(
async ({invalidate}: {invalidate: boolean}) => {
if (invalidate) {
return truncateAndInvalidate(queryClient, NOTIFS_RQKEY('conversations'))
return truncateAndInvalidate(queryClient, NOTIFS_RQKEY('mentions'))
} else {
// TODO
}
Expand All @@ -89,10 +89,10 @@ export function NotificationsScreen({}: Props) {
),
},
{
title: _(msg`Conversations`),
title: _(msg`Mentions`),
component: (
<NotificationsTab
filterTab="conversations"
filterTab="mentions"
hasNew={hasNew}
setIsLoadingLatest={setIsLoadingConversations}
checkUnread={checkUnreadConversations}
Expand Down Expand Up @@ -177,7 +177,7 @@ function NotificationsTab({
checkUnread,
setIsLoadingLatest,
}: {
filterTab: 'all' | 'conversations'
filterTab: 'all' | 'mentions'
hasNew: boolean
checkUnread: ({invalidate}: {invalidate: boolean}) => Promise<void>
setIsLoadingLatest: (v: boolean) => void
Expand Down

0 comments on commit 113db45

Please sign in to comment.