decord/source/modules/favorites/FavoritesUtils.tsx
github-actions f0f877e8ce chore: update source for alpha 347.1
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
2026-09-15 14:23:42 +00:00

45 lines
1.4 KiB
TypeScript

// Module ID: 1983
// Function ID: 1984
// Name: FavoritesUtils
// Dependencies: [1971, 1074, 1115, 2]
// Exports: getFavoritesAwareGuildName, isFavoritableChannel, isFavoritesGuildCategoryNameValid, isFavoritesGuildId
// Module 1983 (FavoritesUtils)
import Constants from "Constants" /* 1074 */;
import util from "util" /* 1115 */;
import FavoritesConstants from "FavoritesConstants" /* 1971 */;
import size from "module_2" /* 2 */;
const FAVORITES_RAW_GUILD_ID = FavoritesConstants.FAVORITES_RAW_GUILD_ID;
const FAVORITES = Constants.FAVORITES;
const result = size.fileFinishedImporting("modules/favorites/FavoritesUtils.tsx");
export const getFavoritesAwareGuildName = function getFavoritesAwareGuildName(guild) {
if (null != guild) {
const id = guild.id;
let tmp2 = id === FAVORITES_RAW_GUILD_ID;
if (!tmp2) {
tmp2 = id === FAVORITES;
}
if (tmp2) {
const intl = util.intl;
let name = intl.string(util.t.wMWyci);
} else {
name = guild.name;
}
return name;
}
};
export function isFavoritesGuildId(guildId) {
let tmp = guildId === FAVORITES_RAW_GUILD_ID;
if (!tmp) {
tmp = guildId === FAVORITES;
}
return tmp;
}
export const isFavoritesGuildCategoryNameValid = function isFavoritesGuildCategoryNameValid(str) {
return "" !== str.trim();
};
export const isFavoritableChannel = function isFavoritableChannel(record) {
return !record.isCategory();
};