48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
// Metro module 247 (f248).
|
|
import RCTDeviceEventEmitterImpl from "./RCTDeviceEventEmitterImpl";
|
|
import { setEventInitTimeStamp } from "./Module134";
|
|
import { HardwareBackPressEvent } from "./HardwareBackPressEvent";
|
|
import Module249 from "./Module249";
|
|
let c264_4;
|
|
let c264_3 = [];
|
|
RCTDeviceEventEmitterImpl.addListener("hardwareBackPress", function(a0) {
|
|
const timeStamp = a0?.timeStamp;
|
|
const r10 = {};
|
|
if (timeStamp != null) {
|
|
setEventInitTimeStamp(r10, timeStamp);
|
|
}
|
|
const hardwareBackPressEvent = new HardwareBackPressEvent(r10);
|
|
let r0 = c264_3.length - 1;
|
|
while (0 <= r0) {
|
|
const r31 = c264_3[r0];
|
|
const r32 = r31 == null;
|
|
const r1 = r0;
|
|
if (r32 ? void 0 : r31.call(c264_3, hardwareBackPressEvent)) {
|
|
return void 0;
|
|
}
|
|
r0 = r1 - 1;
|
|
}
|
|
c264_4.exitApp();
|
|
});
|
|
c264_4 = {
|
|
exitApp: function exitApp() {
|
|
if (Module249) {
|
|
Module249.invokeDefaultBackPressHandler();
|
|
}
|
|
},
|
|
addEventListener: function(a0, a1) {
|
|
if (c264_3.indexOf(a1) === -1) {
|
|
c264_3.push(a1);
|
|
}
|
|
return {
|
|
remove: () => {
|
|
const r7 = c264_3.indexOf(a1);
|
|
if (r7 !== -1) {
|
|
c264_3.splice(r7, 1);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
};
|
|
export default c264_4;
|