mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix insets
This commit is contained in:
@@ -18,6 +18,7 @@ import {NotesPlaceHolder} from '../ListPlaceholders';
|
|||||||
import NoteItem from '../NoteItem';
|
import NoteItem from '../NoteItem';
|
||||||
import SelectionWrapper from '../SelectionWrapper';
|
import SelectionWrapper from '../SelectionWrapper';
|
||||||
import {useIsFocused} from 'react-navigation-hooks';
|
import {useIsFocused} from 'react-navigation-hooks';
|
||||||
|
import {useSafeArea} from 'react-native-safe-area-context';
|
||||||
|
|
||||||
const sectionListRef = createRef();
|
const sectionListRef = createRef();
|
||||||
export const NotesList = ({isGrouped = false}) => {
|
export const NotesList = ({isGrouped = false}) => {
|
||||||
@@ -26,6 +27,7 @@ export const NotesList = ({isGrouped = false}) => {
|
|||||||
const isFocused = useIsFocused();
|
const isFocused = useIsFocused();
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
const [refreshing, setRefreshing] = useState(false);
|
||||||
const searchResults = {...state.searchResults};
|
const searchResults = {...state.searchResults};
|
||||||
|
const insets = useSafeArea();
|
||||||
const _renderItem = ({item, index}) => (
|
const _renderItem = ({item, index}) => (
|
||||||
<SelectionWrapper
|
<SelectionWrapper
|
||||||
index={index}
|
index={index}
|
||||||
@@ -71,13 +73,11 @@ export const NotesList = ({isGrouped = false}) => {
|
|||||||
marginTop:
|
marginTop:
|
||||||
Platform.OS == 'ios'
|
Platform.OS == 'ios'
|
||||||
? notes[0] && !selectionMode
|
? notes[0] && !selectionMode
|
||||||
? DDS.isTab
|
? 135
|
||||||
? 115
|
|
||||||
: 135
|
|
||||||
: 135 - 60
|
: 135 - 60
|
||||||
: notes[0] && !selectionMode
|
: notes[0] && !selectionMode
|
||||||
? 155
|
? 135
|
||||||
: 155 - 60,
|
: 135 - 60 - insets.top,
|
||||||
}}>
|
}}>
|
||||||
<PinnedItems />
|
<PinnedItems />
|
||||||
</View>
|
</View>
|
||||||
@@ -152,13 +152,11 @@ export const NotesList = ({isGrouped = false}) => {
|
|||||||
marginTop:
|
marginTop:
|
||||||
Platform.OS == 'ios'
|
Platform.OS == 'ios'
|
||||||
? notes[0] && !selectionMode
|
? notes[0] && !selectionMode
|
||||||
? DDS.isTab
|
? 135
|
||||||
? 115
|
|
||||||
: 135
|
|
||||||
: 135 - 60
|
: 135 - 60
|
||||||
: notes[0] && !selectionMode
|
: notes[0] && !selectionMode
|
||||||
? 155
|
? 135
|
||||||
: 155 - 60,
|
: 135 - 60 - insets.top,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ const SimpleList = ({
|
|||||||
? 135
|
? 135
|
||||||
: 135 - 60
|
: 135 - 60
|
||||||
: data[0] && !selectionMode
|
: data[0] && !selectionMode
|
||||||
? 155 - insets.top
|
? 135 - insets.top
|
||||||
: 155 - insets.top - 60,
|
: 135 - insets.top - 60,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
|
|||||||
Reference in New Issue
Block a user