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,194 @@
// Metro module 14996 (f14997).
import GuildStore from "../../../../stores/GuildStore";
import SortedGuildStore from "../../../../stores/SortedGuildStore";
import { intl, t } from "../../../../intl/index.native";
import { saveGuildFolders } from "../../../../actions/UserSettingsActionCreators";
import { AccessibilityAnnouncer } from "../../../../design/shared";
import getGuildBarNeighbors from "./getGuildBarNeighbors";
import GuildActionCreators from "../../../../actions/GuildActionCreators";
export default function getGuildsBarGuildAccessibilityActions(a0) {
let name = GuildStore.getGuild(a0)?.name;
if (name == null) {
name = "";
}
const r19 = [];
const guildBarNeighbors = getGuildBarNeighbors(a0);
if (guildBarNeighbors == null) {
return r19;
}
const { containingFolder, above, below } = guildBarNeighbors;
let c21510_1 = intl.formatToPlainString(t["2XShGC"], {
name
});
let c21510_2 = intl.formatToPlainString(t.D4maKL, {
name
});
if (containingFolder == null) {
r19.push({
name: "create-new-folder",
label: intl.string(t.ehmVyX),
action: () => {
GuildActionCreators.createGuildFolderLocal([a0], "");
saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
if (c21510_1 != null) {
AccessibilityAnnouncer.announce(c21510_1);
}
}
});
}
if (above != null) {
if (above.isFolder) {
const node = above.node;
const folderName = node.name != null && node.name !== "" ? node.name : intl.string(t.ebAnWE);
r19.push({
name: `move-up-into-folder-${node.id}`,
label: intl.formatToPlainString(t["08U1Sa"], {
folderName
}),
action: () => {
const guildBarNeighbors = getGuildBarNeighbors(a0);
if (guildBarNeighbors != null) {
const r19 = guildBarNeighbors.above != null ? guildBarNeighbors.above.isFolder ? guildBarNeighbors.above.node : null : null;
if (r19 != null) {
GuildActionCreators.moveById(a0, r19.id, true, true);
saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
if (c21510_1 != null) {
AccessibilityAnnouncer.announce(c21510_1);
}
}
}
}
});
r19.push({
name: `move-above-folder-${node.id}`,
label: intl.formatToPlainString(t.gBM0Vf, {
folderName
}),
action: () => {
const guildBarNeighbors = getGuildBarNeighbors(a0);
if (guildBarNeighbors != null) {
const r18 = guildBarNeighbors.above != null ? guildBarNeighbors.above.isFolder ? guildBarNeighbors.above.node : null : null;
if (r18 != null) {
GuildActionCreators.moveById(a0, r18.id, false, false);
saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
}
}
}
});
} else {
r19.push({
name: "move-up",
label: intl.string(t["yiH+Tx"]),
action: () => {
const guildBarNeighbors = getGuildBarNeighbors(a0);
if (guildBarNeighbors != null) {
const r18 = guildBarNeighbors.above == null ? null : guildBarNeighbors.above.isFolder ? null : guildBarNeighbors.above.node;
if (r18 != null) {
GuildActionCreators.moveById(a0, r18.id, false, false);
saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
}
}
}
});
}
}
if (below != null) {
if (below.isFolder) {
const node2 = below.node;
const folderName2 = node2.name != null && node2.name !== "" ? node2.name : intl.string(t.ebAnWE);
r19.push({
name: `move-down-into-folder-${node2.id}`,
label: intl.formatToPlainString(t["6lLC/B"], {
folderName: folderName2
}),
action: () => {
const guildBarNeighbors = getGuildBarNeighbors(a0);
if (guildBarNeighbors != null) {
const r19 = guildBarNeighbors.below != null ? guildBarNeighbors.below.isFolder ? guildBarNeighbors.below.node : null : null;
if (r19 != null) {
GuildActionCreators.moveById(a0, r19.id, true, true);
saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
if (c21510_1 != null) {
AccessibilityAnnouncer.announce(c21510_1);
}
}
}
}
});
r19.push({
name: `move-below-folder-${node2.id}`,
label: intl.formatToPlainString(t.YhxCkM, {
folderName: folderName2
}),
action: () => {
const guildBarNeighbors = getGuildBarNeighbors(a0);
if (guildBarNeighbors != null) {
const r18 = guildBarNeighbors.below != null ? guildBarNeighbors.below.isFolder ? guildBarNeighbors.below.node : null : null;
if (r18 != null) {
GuildActionCreators.moveById(a0, r18.id, true, false);
saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
}
}
}
});
} else {
r19.push({
name: "move-down",
label: intl.string(t["+V6oLI"]),
action: () => {
const guildBarNeighbors = getGuildBarNeighbors(a0);
if (guildBarNeighbors != null) {
const r18 = guildBarNeighbors.below == null ? null : guildBarNeighbors.below.isFolder ? null : guildBarNeighbors.below.node;
if (r18 != null) {
GuildActionCreators.moveById(a0, r18.id, true, false);
saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
}
}
}
});
}
}
if (containingFolder != null) {
const id = containingFolder.id;
const folderName3 = containingFolder.name != null && containingFolder.name !== "" ? containingFolder.name : intl.string(t.ebAnWE);
r19.push({
name: `move-out-above-${id}`,
label: intl.formatToPlainString(t.vnfRJG, {
folderName: folderName3
}),
action: () => {
const guildBarNeighbors = getGuildBarNeighbors(a0);
if (guildBarNeighbors != null) {
const containingFolder = guildBarNeighbors.containingFolder;
if (containingFolder != null) {
GuildActionCreators.moveById(a0, containingFolder.id, false, false);
saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
if (c21510_2 != null) {
AccessibilityAnnouncer.announce(c21510_2);
}
}
}
}
});
r19.push({
name: `move-out-below-${id}`,
label: intl.formatToPlainString(t.ejhw4S, {
folderName: folderName3
}),
action: () => {
const guildBarNeighbors = getGuildBarNeighbors(a0);
if (guildBarNeighbors != null) {
const containingFolder = guildBarNeighbors.containingFolder;
if (containingFolder != null) {
GuildActionCreators.moveById(a0, containingFolder.id, true, false);
saveGuildFolders(SortedGuildStore.getCompatibleGuildFolders());
if (c21510_2 != null) {
AccessibilityAnnouncer.announce(c21510_2);
}
}
}
}
});
}
return r19;
};