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

33 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 15646
// Function ID: 15647
2026-07-20 16:05:17 +00:00
// Name: useIsHomeDrawerChannelMuted
2026-08-24 06:08:38 +00:00
// Dependencies: [4026, 1395, 5048, 589, 2]
2026-07-20 16:05:17 +00:00
// Exports: useIsHomeDrawerChannelMuted
2026-08-24 06:08:38 +00:00
// Module 15646 (useIsHomeDrawerChannelMuted)
import initialize from "initialize" /* 589 */;
import closure_2 from "storeThread" /* 4026 */;
import { isThread } from "createChannelRecord" /* 1395 */;
import closure_4 from "updateUserGuildSettingsInternal" /* 5048 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
let result = require("set").fileFinishedImporting("modules/home_drawer/native/isHomeDrawerChannelMuted.tsx");
2026-07-20 16:05:17 +00:00
export const useIsHomeDrawerChannelMuted = function useIsHomeDrawerChannelMuted() {
2026-08-24 06:08:38 +00:00
const items = [closure_2, closure_4];
return initialize.useStateFromStores(items, () => (type) => {
2026-07-29 08:29:29 +00:00
const tmp = callback(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
};