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,30 @@
// Metro module 12823 (f12824).
import MediaEngineStore from "../../../stores/MediaEngineStore";
import VoiceStateStore from "../../../stores/VoiceStateStore";
import LifecycleManager from "../../../lib/LifecycleManager";
import Dispatcher from "../../../Dispatcher";
import { dismissVoiceChannelScreens, openChannelCallModal } from "../../../utils/native/PrivateChannelCallUtils";
class VoiceActionSheetManager extends LifecycleManager {
channel = null;
handleOpenChannelCallModal = () => {
const channel = this.channel;
if (channel != null) {
Dispatcher.wait(() => {
dismissVoiceChannelScreens(channel);
openChannelCallModal(channel);
});
this.terminate();
}
};
_initialize(a0) {
this.channel = a0;
VoiceStateStore.addChangeListener(this.handleOpenChannelCallModal);
MediaEngineStore.addChangeListener(this.handleOpenChannelCallModal);
}
_terminate() {
VoiceStateStore.removeChangeListener(this.handleOpenChannelCallModal);
MediaEngineStore.removeChangeListener(this.handleOpenChannelCallModal);
}
}
const voiceActionSheetManager = new VoiceActionSheetManager();
export default voiceActionSheetManager;