45 lines
1.9 KiB
TypeScript
45 lines
1.9 KiB
TypeScript
/* Metro module 11293; source: modules/self_mod/hooks/useChannelSafetyWarning.tsx; dependencies: [9706, 566, 2] */
|
|
function _fun86190(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11479:6, offset: 0x01f8b03e, size: 114 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const channelSafetyWarningsStore = importDefault(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/hooks/useChannelSafetyWarning.tsx');
|
|
exports.useChannelSafetyWarning = useChannelSafetyWarning;
|
|
}
|
|
|
|
function useChannelSafetyWarning(a0, a1) { // fn#86191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11479:216, offset: 0x01f8b0b0, size: 117 bytes, params: 3, frame: 16
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
let value = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSafetyWarningsStore],
|
|
_fun86192, [a0]);
|
|
value = value.filter(function({type}) {
|
|
return type === require;
|
|
});
|
|
return value.find(function(a0) {
|
|
var r1;
|
|
var r0;
|
|
var property;
|
|
var value = a0.dismiss_timestamp == null;
|
|
if (value) {
|
|
value = undefined;
|
|
r1 = a0 == null ? value : a0.expiry;
|
|
value = r1 == null;
|
|
if (value) {
|
|
r1 = value;
|
|
} else {
|
|
property = global.Date;
|
|
value = property.parse(a0.expiry);
|
|
property = global.Date;
|
|
value = value > property.now();
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
});
|
|
}
|
|
|