2026-07-29 08:29:29 +00:00
|
|
|
// Module ID: 1562
|
|
|
|
|
// Function ID: 1563
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useBackButton
|
2026-07-29 08:29:29 +00:00
|
|
|
// Dependencies: [19, 17]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
// Module 1562 (useBackButton)
|
|
|
|
|
import noop from "noop";
|
2026-07-23 10:11:24 +00:00
|
|
|
|
|
|
|
|
require("get ActivityIndicator").BackHandler;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function useBackButton(arg0) {
|
|
|
|
|
const React = arg0;
|
|
|
|
|
const items = [arg0];
|
|
|
|
|
const effect = React.useEffect(() => {
|
2026-07-29 08:29:29 +00:00
|
|
|
let noop = outer1_1.addEventListener("hardwareBackPress", () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
const current = ref.current;
|
|
|
|
|
let tmp = null != current;
|
|
|
|
|
if (tmp) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let flag = current.canGoBack();
|
|
|
|
|
if (flag) {
|
2026-07-20 16:05:17 +00:00
|
|
|
current.goBack();
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
tmp = flag;
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
});
|
|
|
|
|
return () => ref.remove();
|
|
|
|
|
}, items);
|
|
|
|
|
};
|