diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-04-30 17:43:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 17:43:57 +0100 |
commit | bcd3678067c2b807582794ce72f26c3af25d3a75 (patch) | |
tree | 4fe3c547de1b2681319a0e812b9536dd0a332ddf /src/screens/Messages/Conversation/MessagesList.tsx | |
parent | 2b7d796ca96cb098d3875826f20f293a3e956a47 (diff) | |
download | voidsky-bcd3678067c2b807582794ce72f26c3af25d3a75.tar.zst |
[Clipclops] New clipclop dialog (#3750)
* add new routes with placeholder screens * add clops list * add a clop input * add some better padding to the clops * some more adjustments * add rnkc * implement rnkc * implement rnkc * be a little less weird about it * rename clop stuff * rename more clop * one more * add codegenerated lexicon * replace hailey's types * use codegen'd types in components * fix error + throw if fetch failed * remove bad imports * update messageslist and messageitem * import useState * replace hailey's types * use codegen'd types in components * add FAB * new chat dialog * error + default search term * fix typo * fix web styles * optimistically set chat data * use cursor instead of last rev * [Clipclops] Temp codegenerated lexicon (#3749) * add codegenerated lexicon * replace hailey's types * use codegen'd types in components * fix error + throw if fetch failed * remove bad imports * update messageslist and messageitem * import useState * add clop service URL hook * add dm service url storage * use context * use context for service url (temp) * remove log * cleanup merge * fix merge error * disable hack * sender-based message styles * temporary filter * merge cleanup * add `hideBackButton` * rm unneeded return * tried to be smart * hide go back button * use `searchActorTypeahead` instead --------- Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/screens/Messages/Conversation/MessagesList.tsx')
-rw-r--r-- | src/screens/Messages/Conversation/MessagesList.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/screens/Messages/Conversation/MessagesList.tsx b/src/screens/Messages/Conversation/MessagesList.tsx index aafed42af..e3b518f65 100644 --- a/src/screens/Messages/Conversation/MessagesList.tsx +++ b/src/screens/Messages/Conversation/MessagesList.tsx @@ -1,5 +1,6 @@ import React, {useCallback, useMemo, useRef, useState} from 'react' -import {Alert, FlatList, View, ViewToken} from 'react-native' +import {FlatList, View, ViewToken} from 'react-native' +import {Alert} from 'react-native' import {KeyboardAvoidingView} from 'react-native-keyboard-controller' import {isWeb} from 'platform/detection' @@ -64,6 +65,7 @@ export function MessagesList({chatId}: {chatId: string}) { const totalMessages = useRef(10) // TODO later + const [_, setShowSpinner] = useState(false) // Query Data @@ -147,6 +149,8 @@ export function MessagesList({chatId}: {chatId: string}) { }, ) totalMessages.current = filtered.length + + return filtered }, [chat]) return ( @@ -162,7 +166,7 @@ export function MessagesList({chatId}: {chatId: string}) { contentContainerStyle={{paddingHorizontal: 10}} // In the future, we might want to adjust this value. Not very concerning right now as long as we are only // dealing with text. But whenever we have images or other media and things are taller, we will want to lower - // this...probably + // this...probably. initialNumToRender={20} // Same with the max to render per batch. Let's be safe for now though. maxToRenderPerBatch={25} @@ -175,7 +179,6 @@ export function MessagesList({chatId}: {chatId: string}) { maintainVisibleContentPosition={{ minIndexForVisible: 0, }} - // This is actually a header since we are inverted! ListFooterComponent={<MaybeLoader isLoading={false} />} removeClippedSubviews={true} ref={flatListRef} |