64 lines
1.9 KiB
TypeScript
64 lines
1.9 KiB
TypeScript
// Module ID: 10054
|
|
// Function ID: 10055
|
|
// Name: markChannelUnread
|
|
// Dependencies: [4905, 10055, 558, 576, 504, 2]
|
|
// Exports: default
|
|
|
|
// Module 10054 (markChannelUnread)
|
|
import ReadStateStore2 from "ReadStateStore" /* 4905 */;
|
|
import markUnreadDefault from "markUnread" /* 10055 */;
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const require = globalThis.__r;
|
|
const ReadStateStore = ReadStateStore2;
|
|
let _require;
|
|
|
|
const ReadState = ReadStateStore2.ReadState;
|
|
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
|
|
let first;
|
|
let id;
|
|
let tmp6;
|
|
_require = arg0;
|
|
let tmp = _require;
|
|
const obj = require("react");
|
|
const cResult = obj.c(3);
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const items = [ReadStateStore];
|
|
cResult[0] = items;
|
|
first = items;
|
|
} else {
|
|
first = cResult[0];
|
|
}
|
|
if (cResult[1] !== arg0) {
|
|
const fn = function o() {
|
|
const tmp = ReadStateStore.canBeUnread(id.id) && ReadStateStore.hasLastMessage(id.id) && !id.isCategory();
|
|
return tmp;
|
|
};
|
|
cResult[1] = arg0;
|
|
cResult[2] = fn;
|
|
tmp6 = fn;
|
|
} else {
|
|
tmp6 = cResult[2];
|
|
}
|
|
const tmpResult = tmp(504);
|
|
return tmpResult.useStateFromStores(first, tmp6);
|
|
}) : ((arg0) => {
|
|
let id;
|
|
_require = arg0;
|
|
const items = [ReadStateStore];
|
|
const obj = require("get initialized");
|
|
return obj.useStateFromStores(items, () => {
|
|
const tmp = ReadStateStore.canBeUnread(id.id) && ReadStateStore.hasLastMessage(id.id) && !id.isCategory();
|
|
return tmp;
|
|
});
|
|
});
|
|
const result = size.fileFinishedImporting("modules/channel/markChannelUnread.tsx");
|
|
|
|
export default function markChannelUnread(arg0) {
|
|
const lastMessageId = ReadState.get(arg0).lastMessageId;
|
|
if (null != lastMessageId) {
|
|
markUnreadDefault(arg0, lastMessageId);
|
|
}
|
|
};
|
|
export const useCanMarkChannelUnread = tmp2;
|