feat: Initial clean release of CHM
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
这个提交包含在:
@@ -0,0 +1,39 @@
|
||||
import { useMemo } from 'react';
|
||||
import { AccessibilityActionEvent, NativeSyntheticEvent } from 'react-native';
|
||||
|
||||
interface Props {
|
||||
onLongPress: ()=> void;
|
||||
// Read by accessibility tools on iOS/Android when describing
|
||||
// the long press action. For example, TalkBack might read
|
||||
// "Double-tap to activate. Double-tap and hold to [[longPressLabel]]".
|
||||
actionDescription: string;
|
||||
}
|
||||
|
||||
// Allows adding an onLongPress listener in a more accessible way.
|
||||
// In particular:
|
||||
// - For keyboard accessibility (web only) adds an onContextMenu listener.
|
||||
// - Adds a longpress accessibility action. This causes TalkBack to announce that
|
||||
// a longpress accessibility action is available.
|
||||
const useOnLongPressProps = ({ onLongPress, actionDescription }: Props) => {
|
||||
return useMemo(() => {
|
||||
if (!onLongPress) return {};
|
||||
|
||||
return {
|
||||
onContextMenu: (event: NativeSyntheticEvent<unknown>) => {
|
||||
event.preventDefault();
|
||||
onLongPress();
|
||||
},
|
||||
onLongPress,
|
||||
accessibilityActions: [
|
||||
{ name: 'longpress', label: actionDescription },
|
||||
],
|
||||
onAccessibilityAction: (event: AccessibilityActionEvent)=>{
|
||||
if (event.nativeEvent.actionName === 'longpress') {
|
||||
onLongPress();
|
||||
}
|
||||
},
|
||||
};
|
||||
}, [onLongPress, actionDescription]);
|
||||
};
|
||||
|
||||
export default useOnLongPressProps;
|
||||
在新工单中引用
屏蔽一个用户