Skip to content

Commit

Permalink
fix: scroll out to mark read in mobile
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Dec 2, 2024
1 parent a360235 commit a44d598
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const useEntryMarkReadHandler = (entriesIds: string[]) => {
const idSlice = entriesIds?.slice(startIndex, endIndex)

indexKeyIsCalled.add(`${startIndex}-${endIndex}`)

if (!idSlice) return

batchMarkRead(idSlice)
Expand Down
3 changes: 2 additions & 1 deletion apps/renderer/src/modules/entry-column/wrapper.mobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { styles } from "./wrapper.shared"
const noop = async () => {}

export const EntryColumnWrapper = forwardRef<HTMLDivElement, EntryColumnWrapperProps>(
({ children, onPullToRefresh }, ref) => {
({ children, onPullToRefresh, onScroll }, ref) => {
const view = useRouteParamsSelector((state) => state.view)

const [scrollElement, setScrollElement] = useState<HTMLElement | null>(null)
Expand All @@ -26,6 +26,7 @@ export const EntryColumnWrapper = forwardRef<HTMLDivElement, EntryColumnWrapperP
className="h-full overflow-y-auto"
ref={setScrollElement}
id={ENTRY_COLUMN_LIST_SCROLLER_ID}
onScroll={onScroll}
>
{children}
</div>
Expand Down

0 comments on commit a44d598

Please sign in to comment.