forked from Archives/Athou_commafeed
marking an entry as read/unread now requires to swipe to the left since swiping to the right now opens the mobile menu
This commit is contained in:
@@ -110,7 +110,7 @@ export function KeyboardShortcutsHelp() {
|
||||
<Table.Td>
|
||||
<Kbd>M</Kbd>
|
||||
<span>, </span>
|
||||
<Trans>Swipe header to the right</Trans>
|
||||
<Trans>Swipe header to the left</Trans>
|
||||
</Table.Td>
|
||||
</Table.Tr>
|
||||
<Table.Tr>
|
||||
|
||||
@@ -91,7 +91,7 @@ export function FeedEntries() {
|
||||
)
|
||||
}
|
||||
|
||||
const swipedRight = async (entry: ExpendableEntry) => await dispatch(markEntry({ entry, read: !entry.read }))
|
||||
const swipedLeft = async (entry: ExpendableEntry) => await dispatch(markEntry({ entry, read: !entry.read }))
|
||||
|
||||
// close context menu on scroll
|
||||
useEffect(() => {
|
||||
@@ -320,7 +320,7 @@ export function FeedEntries() {
|
||||
onHeaderClick={event => headerClicked(entry, event)}
|
||||
onHeaderRightClick={event => headerRightClicked(entry, event)}
|
||||
onBodyClick={() => bodyClicked(entry)}
|
||||
onSwipedRight={async () => await swipedRight(entry)}
|
||||
onSwipedLeft={async () => await swipedLeft(entry)}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -21,7 +21,7 @@ interface FeedEntryProps {
|
||||
onHeaderClick: (e: React.MouseEvent) => void
|
||||
onHeaderRightClick: (e: React.MouseEvent) => void
|
||||
onBodyClick: (e: React.MouseEvent) => void
|
||||
onSwipedRight: () => void
|
||||
onSwipedLeft: () => void
|
||||
}
|
||||
|
||||
const useStyles = tss
|
||||
@@ -111,7 +111,7 @@ export function FeedEntry(props: FeedEntryProps) {
|
||||
})
|
||||
|
||||
const swipeHandlers = useSwipeable({
|
||||
onSwipedRight: props.onSwipedRight,
|
||||
onSwipedLeft: props.onSwipedLeft,
|
||||
})
|
||||
|
||||
let paddingX: MantineSpacing = "xs"
|
||||
|
||||
Reference in New Issue
Block a user