This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,58 @@
// Metro module 16328 (f16329).
import ChannelStore from "../../stores/ChannelStore";
import SelectedChannelStore from "../../stores/SelectedChannelStore";
import UserStore from "../../stores/UserStore";
import { SYSTEM_USER } from "./Constants";
import { UserFlags } from "../../Constants";
import { setFlag } from "../../actions/UserActionCreators";
import AutomaticLifecycleManager from "../../lib/AutomaticLifecycleManager";
let c11744_7, maybeClearUrgentMessage;
const maybeShowUrgentMessageModal = function maybeShowUrgentMessageModal(handleShowUrgentMessageAlert) {
L5: {
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
const channelId = SelectedChannelStore.getChannelId();
const dMFromUserId = ChannelStore.getDMFromUserId(SYSTEM_USER);
if (currentUser.hasUrgentMessages() && dMFromUserId !== channelId) {
if (c11744_7) {
break L5;
}
c11744_7 = true;
handleShowUrgentMessageAlert();
break L5;
}
const currentUser2 = UserStore.getCurrentUser();
const dMFromUserId2 = ChannelStore.getDMFromUserId(SYSTEM_USER);
if (currentUser2 != null && currentUser2.hasUrgentMessages() && channelId === dMFromUserId2) {
c11744_7 = false;
setFlag(UserFlags.HAS_UNREAD_URGENT_MESSAGES, false);
}
return void 0;
}
}
};
maybeClearUrgentMessage = function maybeClearUrgentMessage({ channelId }) {
const currentUser = UserStore.getCurrentUser();
const dMFromUserId = ChannelStore.getDMFromUserId(SYSTEM_USER);
if (currentUser != null && currentUser.hasUrgentMessages() && channelId === dMFromUserId) {
c11744_7 = false;
setFlag(UserFlags.HAS_UNREAD_URGENT_MESSAGES, false);
}
};
c11744_7 = false;
class UrgentSystemDMManagerBase extends AutomaticLifecycleManager {
actions = {
POST_CONNECTION_OPEN: () => {
maybeShowUrgentMessageModal(this.handleShowUrgentMessageAlert);
},
MESSAGE_CREATE: () => {
maybeShowUrgentMessageModal(this.handleShowUrgentMessageAlert);
},
CHANNEL_SELECT: maybeClearUrgentMessage
};
constructor(a0) {
super();
this.handleShowUrgentMessageAlert = a0;
}
}
export default UrgentSystemDMManagerBase;