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,27 @@
// Metro module 10806 (f10807).
import GameConsoleStore from "../../../game_console/GameConsoleStore";
import { useStateFromStoresObject } from "../../../../_bundle/Module589";
import { PrimaryActionButton } from "./CallBarAction";
import Module7699 from "../../../../_bundle/Module7699";
import Module10761 from "../../../../_bundle/Module10761";
import { intl, t } from "../../../../intl/index.native";
import { remoteDisconnect, disconnectRemote } from "../../../game_console/GameConsoleActionCreators";
import { handleDisconnect } from "../../../voice_calls/native/CallsUtils";
export function DisconnectRemoteButton(props) {
let remoteSessionId;
const { channel, isSmallSize } = props;
remoteSessionId = void 0;
const stateFromStoresObject = useStateFromStoresObject([GameConsoleStore], () => ({
awaitingRemote: GameConsoleStore.getAwaitingRemoteSessionInfo() != null,
remoteSessionId: GameConsoleStore.getRemoteSessionId()
}));
remoteSessionId = stateFromStoresObject.remoteSessionId;
return <PrimaryActionButton source={stateFromStoresObject.awaitingRemote ? Module7699 : Module10761} accessibilityLabel={intl.string(t["6vrfgt"])} isSmallSize={isSmallSize} onPress={() => {
if (remoteSessionId != null) {
remoteDisconnect(remoteSessionId);
handleDisconnect(channel);
} else {
disconnectRemote();
}
}} />;
}