decord/source/modules/home_drawer/native/isHomeDrawerChannelMuted.tsx

34 lines
1.1 KiB
TypeScript
Raw Normal View History

// Module ID: 16448
// Function ID: 16449
// Name: isHomeDrawerChannelMuted
// Dependencies: [4278, 1962, 4819, 504, 2]
2026-07-20 16:05:17 +00:00
// Exports: useIsHomeDrawerChannelMuted
// Module 16448 (isHomeDrawerChannelMuted)
import initialize from "initialize" /* 504 */;
import JoinedThreadsStore from "JoinedThreadsStore" /* 4278 */;
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4819 */;
2026-07-23 10:11:24 +00:00
require = fn;
const isThread = fn(1962).isThread;
const size = fn(2);
let result = size.fileFinishedImporting("modules/home_drawer/native/isHomeDrawerChannelMuted.tsx");
2026-07-20 16:05:17 +00:00
export const useIsHomeDrawerChannelMuted = function useIsHomeDrawerChannelMuted() {
const items = [JoinedThreadsStore, UserGuildSettingsStore];
2026-08-24 06:08:38 +00:00
return initialize.useStateFromStores(items, () => (type) => {
const tmp = closure_1_3(type.type);
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-29 08:29:29 +00:00
if (muted.isMuted(type.id)) {
2026-07-20 16:05:17 +00:00
return true;
}
}
const tmp3 = tmp ? type.parent_id : type.id;
let result = null != tmp3;
if (result) {
2026-07-29 08:29:29 +00:00
result = guildOrCategoryOrChannelMuted.isGuildOrCategoryOrChannelMuted(type.guild_id, tmp3);
2026-07-20 16:05:17 +00:00
}
return result;
2026-08-24 06:08:38 +00:00
}, [], initialize.statesWillNeverBeEqual);
2026-07-20 16:05:17 +00:00
};