decord/beta/source/components_native/common/UntouchableAlert.tsx

54 lines
1.6 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 15538
// Function ID: 15539
// Name: UntouchableAlert
2026-10-12 16:32:48 +00:00
// Dependencies: [19, 17, 21, 5092, 4827, 6154, 2]
2026-10-12 16:32:48 +00:00
// Module 15538 (UntouchableAlert)
2026-10-01 14:13:23 +00:00
import react_native from "react-native" /* 17 */;
import Fragment from "Fragment" /* 21 */;
2026-10-12 16:32:48 +00:00
import native from "native" /* 4827 */;
import ActivityIndicator_ActivityIndicator from "ActivityIndicator/ActivityIndicator" /* 6154 */;
2026-10-01 14:13:23 +00:00
import react from "react" /* 19 */;
2026-10-12 16:32:48 +00:00
import createStyles from "createStyles" /* 5092 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
2026-10-01 14:13:23 +00:00
const View = react_native.View;
const jsx = Fragment.jsx;
let closure_4 = createStyles.createLegacyClassComponentStyles({ container: { flex: 1, alignItems: "center", justifyContent: "center" } });
2026-10-01 14:13:23 +00:00
const PureComponent = react.PureComponent;
class UntouchableAlert extends PureComponent {
2026-10-01 14:13:23 +00:00
componentDidMount() {
const self = this;
if (!this.props.loading) {
self.closeAlert();
}
}
componentDidUpdate(loading) {
const self = this;
loading = this.props.loading;
const tmp = loading.loading === loading || loading;
if (!tmp) {
self.closeAlert();
}
}
2026-10-01 14:13:23 +00:00
closeAlert() {
const self = this;
setImmediate(() => {
const props = self.props;
return props.onClose();
});
}
2026-10-01 14:13:23 +00:00
render() {
let tmp2 = null;
if (this.props.loading) {
tmp2 = <View style={tmp.container}>{jsx(ActivityIndicator_ActivityIndicator.ActivityIndicator, {})}</View>;
}
return tmp2;
}
2026-10-01 14:13:23 +00:00
}
const prototype = UntouchableAlert.prototype;
UntouchableAlert.contextType = native.ThemeContext;
const result = size.fileFinishedImporting("components_native/common/UntouchableAlert.tsx");
export default UntouchableAlert;