Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
// Module ID: 13225
|
|
// Function ID: 13226
|
|
// Name: shouldShowVoiceChannelChangeConfirmation
|
|
// Dependencies: [4775, 1188, 502, 2067, 4777, 2]
|
|
// Exports: shouldShowVoiceChannelChangeConfirmation
|
|
|
|
// Module 13225 (shouldShowVoiceChannelChangeConfirmation)
|
|
import GameConsoleStore from "GameConsoleStore" /* 4775 */;
|
|
import UnsyncedUserSettingsStore from "UnsyncedUserSettingsStore" /* 1188 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
import GuildStore from "GuildStore" /* 2067 */;
|
|
import VoiceStateStore from "VoiceStateStore" /* 4777 */;
|
|
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx");
|
|
|
|
export const shouldShowVoiceChannelChangeConfirmation = function shouldShowVoiceChannelChangeConfirmation(id) {
|
|
if (UnsyncedUserSettingsStore.disableVoiceChannelChangeAlert) {
|
|
return false;
|
|
} else {
|
|
const remoteSessionId = GameConsoleStore.getRemoteSessionId();
|
|
if (null != VoiceStateStore.getVoiceStateForSession(AuthenticationStore.getId(), remoteSessionId)) {
|
|
return false;
|
|
} else if (obj.isCurrentClientInVoiceChannel()) {
|
|
if (obj.isInChannel(id.id)) {
|
|
return false;
|
|
} else {
|
|
guild = GuildStore.getGuild(id.getGuildId());
|
|
let afkChannelId;
|
|
if (guild != null) {
|
|
afkChannelId = guild.afkChannelId;
|
|
}
|
|
return null == afkChannelId || !obj.isInChannel(guild.afkChannelId);
|
|
}
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
};
|