Skip to content

Commit a44d598

Browse files
committed
fix: scroll out to mark read in mobile
Signed-off-by: Innei <tukon479@gmail.com>
1 parent a360235 commit a44d598

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

apps/renderer/src/modules/entry-column/hooks/useEntryMarkReadHandler.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const useEntryMarkReadHandler = (entriesIds: string[]) => {
2121
const idSlice = entriesIds?.slice(startIndex, endIndex)
2222

2323
indexKeyIsCalled.add(`${startIndex}-${endIndex}`)
24+
2425
if (!idSlice) return
2526

2627
batchMarkRead(idSlice)

apps/renderer/src/modules/entry-column/wrapper.mobile.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { styles } from "./wrapper.shared"
1313
const noop = async () => {}
1414

1515
export const EntryColumnWrapper = forwardRef<HTMLDivElement, EntryColumnWrapperProps>(
16-
({ children, onPullToRefresh }, ref) => {
16+
({ children, onPullToRefresh, onScroll }, ref) => {
1717
const view = useRouteParamsSelector((state) => state.view)
1818

1919
const [scrollElement, setScrollElement] = useState<HTMLElement | null>(null)
@@ -26,6 +26,7 @@ export const EntryColumnWrapper = forwardRef<HTMLDivElement, EntryColumnWrapperP
2626
className="h-full overflow-y-auto"
2727
ref={setScrollElement}
2828
id={ENTRY_COLUMN_LIST_SCROLLER_ID}
29+
onScroll={onScroll}
2930
>
3031
{children}
3132
</div>

0 commit comments

Comments
 (0)