2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 7643
|
|
|
|
|
// Function ID: 7644
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: getHasImportantUnread
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [4777, 5048, 5049, 589, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: getHasImportantUnread, useHasImportantUnread
|
|
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 7643 (getHasImportantUnread)
|
|
|
|
|
import closure_2 from "generateOldThreadCutoff" /* 4777 */;
|
|
|
|
|
import closure_3 from "updateUserGuildSettingsInternal" /* 5048 */;
|
|
|
|
|
import { UnreadSetting } from "ReadStateTypes" /* 5049 */;
|
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-07-29 08:29:29 +00:00
|
|
|
return _require(589).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;
|
|
|
|
|
});
|
|
|
|
|
};
|