Revize 293f99f8
Přidáno uživatelem Fantič před více než 1 rok
src/components/notes/NotesListView.tsx | ||
---|---|---|
7 | 7 |
import { ConfirmDialog } from "../general/Dialogs"; |
8 | 8 |
import { AppDispatch } from "../../stores/store"; |
9 | 9 |
import { useDispatch } from "react-redux"; |
10 |
import { Dimensions } from "react-native"; |
|
11 | 10 |
import { InfoToast } from "../toast/InfoToast"; |
12 | 11 |
|
13 | 12 |
|
14 | 13 |
|
15 |
const NotesListView = (props: { notes: Note[], navigation: any, handleCreateComment: any, requestPending: boolean }) => { |
|
14 |
const NotesListView = (props: { notes: Note[], navigation: any, handleCreateComment: any, requestPending: boolean, height: number }) => {
|
|
16 | 15 |
const notes = props.notes; |
17 | 16 |
|
18 | 17 |
const [newComment, setNewComment] = useState<string>(""); |
... | ... | |
26 | 25 |
|
27 | 26 |
const dispatch = useDispatch<AppDispatch>(); |
28 | 27 |
|
29 |
const windowHeight = Dimensions.get('window').height; |
|
30 |
|
|
31 | 28 |
const [confirmDialog, setConfirmDialog] = React.useState<{ |
32 | 29 |
headerText?: string; |
33 | 30 |
bodyText?: string; |
... | ... | |
96 | 93 |
|
97 | 94 |
return ( |
98 | 95 |
<VStack> |
99 |
<Box height={windowHeight - 70 - 160 - (replyingTo ? 40 : 0)} marginBottom={2}>
|
|
96 |
<Box height={props.height - (replyingTo ? 40 : 0) ?? undefined} marginBottom={2}>
|
|
100 | 97 |
{/* Notes */} |
101 | 98 |
<ScrollView contentContainerStyle={{ flexGrow: 1 }} onScrollEndDrag={handleScrollEnd}> |
102 | 99 |
{ |
Také k dispozici: Unified diff
re #10819 ItemView notes: notesListView height refactor