fix crash from pinning

This commit is contained in:
ammarahm-ed
2020-03-17 10:02:34 +05:00
parent 01110207c4
commit 5c545b47e3
2 changed files with 9 additions and 3 deletions

View File

@@ -19,6 +19,9 @@ const SimpleList = ({
refreshing,
placeholderText,
pinned = null,
isMove,
hideMore,
noteToMove,
}) => {
const [state, dispatch] = useTracked();
const {colors, selectionMode} = state;
@@ -116,7 +119,7 @@ const SimpleList = ({
renderItem={({item, index}) =>
item.type === 'notebook' ? (
<NotebookItem
hideMore={params.hideMore}
hideMore={hideMore}
customStyle={{
backgroundColor: Platform.ios
? hexToRGBA(colors.accent + '19')
@@ -130,9 +133,9 @@ const SimpleList = ({
borderBottomWidth: 0,
marginHorizontal: 0,
}}
isMove={params.isMove}
isMove={isMove}
onLongPress={() => {}}
noteToMove={params.note}
noteToMove={noteToMove}
item={item}
pinned={true}
index={index}

View File

@@ -127,6 +127,9 @@ export const Folders = ({navigation}) => {
focused={isFocused}
onRefresh={_onRefresh}
renderItem={_renderItem}
hideMore={params.hideMore}
isMove={params.isMove}
noteToMove={params.note}
placeholder={
<>
<NotebookPlaceHolder animation={slideRight} colors={colors} />