decord/source/__polyfill/01xxx/module_1590.js
github-actions f0f877e8ce chore: update source for alpha 347.1
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
2026-09-15 14:23:42 +00:00

30 lines
674 B
JavaScript

// Module ID: 1590
// Function ID: 1591
// Dependencies: [19, 17]
// Exports: useBackButton
// Module 1590
import noop from "module_19" /* 19 */;
fn(17).BackHandler;
export const useBackButton = function useBackButton(ref) {
noop = ref;
const items = [ref];
const effect = noop.useEffect(() => {
BackHandler.addEventListener("hardwareBackPress", () => {
const current = ref.current;
let tmp = null != current;
if (tmp) {
let flag = current.canGoBack();
if (flag) {
current.goBack();
flag = true;
}
tmp = flag;
}
return tmp;
});
return () => ref.remove();
}, items);
};