decord/source/stores/EditMessageStore.tsx

124 lines
3.5 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 7035
// Function ID: 7036
2026-07-29 08:29:29 +00:00
// Name: initialize
2026-08-05 07:35:12 +00:00
// Dependencies: [4472, 3928, 7036, 7039, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-05 07:35:12 +00:00
// Module 7035 (initialize)
2026-07-29 08:29:29 +00:00
import reinjectEphemerals from "reinjectEphemerals";
import { Store } from "initialize";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let closure_4 = {};
let closure_5 = {};
class EditMessageStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = EditMessageStore.prototype;
prototype["initialize"] = function initialize() {
this.waitFor(reinjectEphemerals);
};
prototype["isEditing"] = function isEditing(arg0, arg1) {
let messageId;
if (dependencyMap[arg0] != null) {
messageId = tmp.messageId;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return messageId === arg1;
};
prototype["isEditingAny"] = function isEditingAny(arg0) {
return null != dependencyMap[arg0];
};
prototype["getEditingTextValue"] = function getEditingTextValue(id) {
let textValue;
if (dependencyMap[id] != null) {
textValue = tmp.textValue;
}
return textValue;
};
prototype["getEditingRichValue"] = function getEditingRichValue(arg0) {
let richValue;
if (dependencyMap[arg0] != null) {
richValue = tmp.richValue;
}
return richValue;
};
prototype["getEditingMessageId"] = function getEditingMessageId(memo1) {
let messageId;
if (dependencyMap[memo1] != null) {
messageId = tmp.messageId;
}
return messageId;
};
prototype["getEditingMessage"] = function getEditingMessage(id) {
let message = null;
if (null != dependencyMap[id]) {
message = null;
if (null != tmp.messageId) {
message = message.getMessage(id, tmp.messageId);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
return message;
};
prototype["getEditActionSource"] = function getEditActionSource(outer1_0) {
return table[outer1_0];
};
EditMessageStore.displayName = "EditMessageStore";
const editMessageStore = new EditMessageStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
MESSAGE_START_EDIT: function handleMessageStartEdit(arg0) {
let channelId;
let content;
let messageId;
let source;
({ channelId, content } = arg0);
({ messageId, source } = arg0);
2026-08-05 07:35:12 +00:00
const UseLegacyChatInput = require(3928) /* explicitContentFromProto */.UseLegacyChatInput;
2026-07-20 16:05:17 +00:00
const setting = UseLegacyChatInput.getSetting();
2026-08-05 07:35:12 +00:00
let obj = importDefault(7036);
2026-07-20 16:05:17 +00:00
const unparseResult = obj.unparse(content, channelId);
2026-07-29 08:29:29 +00:00
obj = { channelId, messageId, textValue: unparseResult, richValue: null };
2026-07-20 16:05:17 +00:00
if (setting) {
content = unparseResult;
}
2026-08-05 07:35:12 +00:00
obj[3] = require(7039) /* createEmptyState */.toRichValue(content);
2026-07-29 08:29:29 +00:00
closure_4[channelId] = obj;
closure_5[channelId] = source;
2026-07-20 16:05:17 +00:00
},
MESSAGE_UPDATE_EDIT: function handleMessageUpdateEdit(channelId) {
channelId = channelId.channelId;
2026-07-23 10:11:24 +00:00
if (null == dependencyMap[channelId]) {
2026-07-20 16:05:17 +00:00
return false;
} else {
const obj = {};
const merged = Object.assign(tmp3);
2026-07-29 08:29:29 +00:00
obj.textValue = tmp;
obj.richValue = tmp2;
2026-07-23 10:11:24 +00:00
dependencyMap[channelId] = obj;
2026-07-20 16:05:17 +00:00
}
},
MESSAGE_END_EDIT: function handleMessageEndEdit(channelId) {
channelId = channelId.channelId;
if (null != channelId) {
2026-07-23 10:11:24 +00:00
if (null != dependencyMap[channelId]) {
delete tmp3[tmp2];
delete tmp[tmp2];
2026-07-20 16:05:17 +00:00
}
}
return false;
},
MESSAGE_DELETE: function handleMessageDelete(id) {
let messageId;
2026-07-29 08:29:29 +00:00
if (dependencyMap[id.channelId] != null) {
2026-07-23 10:11:24 +00:00
messageId = tmp4.messageId;
2026-07-20 16:05:17 +00:00
}
if (messageId === id.id) {
2026-07-23 10:11:24 +00:00
delete tmp3[tmp2];
delete tmp[tmp2];
2026-07-20 16:05:17 +00:00
}
},
LOGOUT: function handleLogout() {
2026-07-29 08:29:29 +00:00
let closure_4 = {};
let closure_5 = {};
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
const result = require("rebuild").fileFinishedImporting("stores/EditMessageStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default editMessageStore;