Skip to content

Commit 895353c

Browse files
authored
fix: Fixes bottom note being hidden behind nav bar on Android (#2966)
1 parent 9c73714 commit 895353c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/web/src/javascripts/Components/ContentListView/ContentList.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { ElementIds } from '@/Constants/ElementIDs'
99
import { classNames } from '@standardnotes/utils'
1010
import { SNTag } from '@standardnotes/snjs'
1111
import { ItemListController } from '@/Controllers/ItemList/ItemListController'
12+
import { useMediaQuery, MutuallyExclusiveMediaQueryBreakpoints } from '@/Hooks/useMediaQuery'
1213

1314
type Props = {
1415
application: WebApplication
@@ -25,6 +26,8 @@ const ContentList: FunctionComponent<Props> = ({ application, items, selectedUui
2526
const { sortBy } = itemListController.displayOptions
2627
const selectedTag = navigationController.selected
2728

29+
const isMobileScreen = useMediaQuery(MutuallyExclusiveMediaQueryBreakpoints.sm)
30+
2831
const onScroll: UIEventHandler = useCallback(
2932
(e) => {
3033
const offset = NOTES_LIST_SCROLL_THRESHOLD
@@ -83,7 +86,8 @@ const ContentList: FunctionComponent<Props> = ({ application, items, selectedUui
8386
className={classNames(
8487
'infinite-scroll overflow-y-auto overflow-x-hidden focus:shadow-none focus:outline-none',
8588
'md:max-h-full pointer-coarse:md:overflow-y-auto',
86-
'flex-grow pb-2',
89+
'flex-grow',
90+
isMobileScreen ? !itemListController.isMultipleSelectionMode && 'pb-safe-bottom' : 'pb-2',
8791
)}
8892
id={ElementIds.ContentList}
8993
onScroll={onScroll}

0 commit comments

Comments
 (0)