diff --git a/eslint-suppressions.json b/eslint-suppressions.json
index ca3c9e9e0a..09752b39ea 100644
--- a/eslint-suppressions.json
+++ b/eslint-suppressions.json
@@ -139,11 +139,6 @@
"count": 1
}
},
- "src/components/dialogs/GifSelect.tsx": {
- "@typescript-eslint/no-explicit-any": {
- "count": 1
- }
- },
"src/components/dialogs/LanguageSelectDialog.tsx": {
"@typescript-eslint/no-explicit-any": {
"count": 1
@@ -579,21 +574,6 @@
"count": 3
}
},
- "src/view/com/lightbox/ImageViewing/@types/index.ts": {
- "@typescript-eslint/no-explicit-any": {
- "count": 1
- }
- },
- "src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx": {
- "@typescript-eslint/no-explicit-any": {
- "count": 1
- }
- },
- "src/view/com/lightbox/ImageViewing/index.tsx": {
- "@typescript-eslint/no-explicit-any": {
- "count": 1
- }
- },
"src/view/com/lists/ListMembers.tsx": {
"@typescript-eslint/no-explicit-any": {
"count": 3
@@ -709,11 +689,6 @@
"count": 1
}
},
- "src/view/com/util/fab/FABInner.tsx": {
- "@typescript-eslint/no-explicit-any": {
- "count": 1
- }
- },
"src/view/screens/Debug.tsx": {
"@typescript-eslint/no-explicit-any": {
"count": 1
diff --git a/src/screens/Messages/ChatList.tsx b/src/screens/Messages/ChatList.tsx
index 1e842fcc0e..eddedff3e0 100644
--- a/src/screens/Messages/ChatList.tsx
+++ b/src/screens/Messages/ChatList.tsx
@@ -1,7 +1,7 @@
import {useCallback, useEffect, useMemo, useState} from 'react'
import {View} from 'react-native'
import {useAnimatedRef} from 'react-native-reanimated'
-import {type ChatBskyActorDefs, type ChatBskyConvoDefs} from '@atproto/api'
+import {type ChatBskyConvoDefs} from '@atproto/api'
import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {Trans} from '@lingui/react/macro'
@@ -19,7 +19,6 @@ import {MESSAGE_SCREEN_POLL_INTERVAL} from '#/state/messages/convo/const'
import {useMessagesEventBus} from '#/state/messages/events'
import {useLeftConvos} from '#/state/queries/messages/leave-conversation'
import {useListConvosQuery} from '#/state/queries/messages/list-conversations'
-import {useSession} from '#/state/session'
import {List, type ListRef} from '#/view/com/util/List'
import {ChatListLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
@@ -41,30 +40,19 @@ import {Text} from '#/components/Typography'
import {useAgeAssurance} from '#/ageAssurance'
import {IS_NATIVE} from '#/env'
import {ChatListItem} from './components/ChatListItem'
-import {InboxPreview} from './components/InboxPreview'
+import {InboxRequests} from './components/InboxRequests'
-type ListItem =
- | {
- type: 'INBOX'
- count: number
- profiles: ChatBskyActorDefs.ProfileViewBasic[]
- }
- | {
- type: 'CONVERSATION'
- conversation: ChatBskyConvoDefs.ConvoView
- }
+type ListItem = {
+ type: 'CONVERSATION'
+ conversation: ChatBskyConvoDefs.ConvoView
+}
function renderItem({item}: {item: ListItem}) {
- switch (item.type) {
- case 'INBOX':
- return
- case 'CONVERSATION':
- return
- }
+ return
}
function keyExtractor(item: ListItem) {
- return item.type === 'INBOX' ? 'INBOX' : item.conversation.id
+ return item.conversation.id
}
type Props = NativeStackScreenProps
@@ -99,7 +87,6 @@ export function MessagesScreen(props: Props) {
export function MessagesScreenInner({navigation, route}: Props) {
const {_} = useLingui()
const t = useTheme()
- const {currentAccount} = useSession()
const newChatControl = useDialogControl()
const scrollElRef: ListRef = useAnimatedRef()
const pushToConversation = route.params?.pushToConversation
@@ -147,7 +134,11 @@ export function MessagesScreenInner({navigation, route}: Props) {
refetch,
} = useListConvosQuery({status: 'accepted'})
- const {data: inboxData, refetch: refetchInbox} = useListConvosQuery({
+ const {
+ data: inboxData,
+ refetch: refetchInbox,
+ hasNextPage: hasMoreRequests,
+ } = useListConvosQuery({
status: 'request',
})
@@ -165,15 +156,6 @@ export function MessagesScreenInner({navigation, route}: Props) {
!convo.muted &&
convo.members.every(member => member.handle !== 'missing.invalid'),
) ?? []
- const hasInboxConvos = inboxAllConvos?.length > 0
-
- const inboxUnreadConvos = inboxAllConvos.filter(
- convo => convo.unreadCount > 0,
- )
-
- const inboxUnreadConvoMembers = inboxUnreadConvos
- .map(x => x.members.find(y => y.did !== currentAccount?.did))
- .filter(x => !!x)
const conversations = useMemo(() => {
if (data?.pages) {
@@ -183,15 +165,6 @@ export function MessagesScreenInner({navigation, route}: Props) {
.filter(convo => !leftConvos.includes(convo.id))
return [
- ...(hasInboxConvos
- ? [
- {
- type: 'INBOX' as const,
- count: inboxUnreadConvoMembers.length,
- profiles: inboxUnreadConvoMembers.slice(0, 3),
- },
- ]
- : []),
...conversations.map(
convo =>
({
@@ -202,7 +175,7 @@ export function MessagesScreenInner({navigation, route}: Props) {
] satisfies ListItem[]
}
return []
- }, [data, leftConvos, hasInboxConvos, inboxUnreadConvoMembers])
+ }, [data, leftConvos])
const onRefresh = useCallback(async () => {
setIsPTRing(true)
@@ -258,11 +231,12 @@ export function MessagesScreenInner({navigation, route}: Props) {
if (activeConversations.length === 0) {
return (
-
+
- {!isLoading && hasInboxConvos && (
-
- )}
{isLoading ? (
) : (
@@ -338,7 +312,11 @@ export function MessagesScreenInner({navigation, route}: Props) {
return (
-
+
+ )
+
const settingsLink = (
+ {requestsLink}
{settingsLink}