Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ElementIds } from '@/Constants/ElementIDs'
import { classNames } from '@standardnotes/utils'
import { SNTag } from '@standardnotes/snjs'
import { ItemListController } from '@/Controllers/ItemList/ItemListController'
import { useMediaQuery, MutuallyExclusiveMediaQueryBreakpoints } from '@/Hooks/useMediaQuery'

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

const isMobileScreen = useMediaQuery(MutuallyExclusiveMediaQueryBreakpoints.sm)

const onScroll: UIEventHandler = useCallback(
(e) => {
const offset = NOTES_LIST_SCROLL_THRESHOLD
Expand Down Expand Up @@ -83,7 +86,8 @@ const ContentList: FunctionComponent<Props> = ({ application, items, selectedUui
className={classNames(
'infinite-scroll overflow-y-auto overflow-x-hidden focus:shadow-none focus:outline-none',
'md:max-h-full pointer-coarse:md:overflow-y-auto',
'flex-grow pb-2',
'flex-grow',
isMobileScreen ? !itemListController.isMultipleSelectionMode && 'pb-safe-bottom' : 'pb-2',
)}
id={ElementIds.ContentList}
onScroll={onScroll}
Expand Down
Loading