2026-09-03 10:05:34 +00:00
|
|
|
// Module ID: 9962
|
|
|
|
|
// Function ID: 9963
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: getHasImportantUnread
|
2026-09-03 10:05:34 +00:00
|
|
|
// Dependencies: [4493, 4702, 4703, 586, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: getHasImportantUnread, useHasImportantUnread
|
|
|
|
|
|
2026-09-03 10:05:34 +00:00
|
|
|
// Module 9962 (getHasImportantUnread)
|
2026-09-01 10:26:29 +00:00
|
|
|
import closure_2 from "generateOldThreadCutoff" /* 4493 */;
|
2026-09-03 10:05:34 +00:00
|
|
|
import closure_3 from "updateUserGuildSettingsInternal" /* 4702 */;
|
|
|
|
|
import { UnreadSetting } from "ReadStateTypes" /* 4703 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
|
|
|
|
const require = arg1;
|
2026-08-24 06:08:38 +00:00
|
|
|
const result = require("set").fileFinishedImporting("modules/read_states/ReadStateUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const getHasImportantUnread = function getHasImportantUnread(channel) {
|
2026-08-24 06:08:38 +00:00
|
|
|
let hasUnreadResult = closure_2.hasUnread(channel.id);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (hasUnreadResult) {
|
2026-08-24 06:08:38 +00:00
|
|
|
hasUnreadResult = closure_3.resolveUnreadSetting(channel) === UnreadSetting.ALL_MESSAGES;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return hasUnreadResult;
|
|
|
|
|
};
|
|
|
|
|
export const useHasImportantUnread = function useHasImportantUnread(arg0) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const _require = arg0;
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_2, closure_3];
|
2026-09-02 09:53:35 +00:00
|
|
|
return _require(586).useStateFromStores(items, () => {
|
2026-08-24 06:08:38 +00:00
|
|
|
let hasUnreadResult = closure_1_2.hasUnread(id.id);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (hasUnreadResult) {
|
2026-08-24 06:08:38 +00:00
|
|
|
hasUnreadResult = closure_1_3.resolveUnreadSetting(id) === closure_1_4.ALL_MESSAGES;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return hasUnreadResult;
|
|
|
|
|
});
|
|
|
|
|
};
|