decord/source/actions/DimensionActionCreators.tsx

39 lines
1.4 KiB
TypeScript
Raw Normal View History

// Module ID: 11119
// Function ID: 11120
// Name: DimensionActionCreators
// Dependencies: [573, 2]
2026-07-20 16:05:17 +00:00
// Module 11119 (DimensionActionCreators)
import DispatcherDefault from "Dispatcher" /* 573 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
let result = size.fileFinishedImporting("actions/DimensionActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default {
updateChannelDimensions(id, eventTimestamp, scrollTop, scrollHeight, offsetHeight, fn) {
DispatcherDefault.dispatch({ type: "UPDATE_CHANNEL_DIMENSIONS", channelId: id, timestamp: eventTimestamp, scrollTop, scrollHeight, offsetHeight });
if (fn != null) {
fn();
2026-07-20 16:05:17 +00:00
}
},
updateChannelListScroll(guildId, scrollTop) {
let items = arg2;
if (arg2 === undefined) {
items = [];
}
DispatcherDefault.dispatch({ type: "UPDATE_CHANNEL_LIST_DIMENSIONS", guildId, scrollTop, channelIds: items });
2026-07-20 16:05:17 +00:00
},
channelListScrollTo(guildId, dMFromUserId) {
DispatcherDefault.dispatch({ type: "UPDATE_CHANNEL_LIST_DIMENSIONS", guildId, scrollTo: dMFromUserId, channelIds: [] });
2026-07-20 16:05:17 +00:00
},
clearChannelListScrollTo(guildId) {
DispatcherDefault.dispatch({ type: "UPDATE_CHANNEL_LIST_DIMENSIONS", guildId, scrollTo: null, channelIds: [] });
2026-07-20 16:05:17 +00:00
},
clearChannelDimensions(channelId, fn) {
const result = this.updateChannelDimensions(channelId, Date.now(), null, null, null, fn);
2026-07-20 16:05:17 +00:00
},
updateGuildListScrollTo(scrollTop) {
DispatcherDefault.dispatch({ type: "UPDATE_GUILD_LIST_DIMENSIONS", scrollTop });
2026-07-20 16:05:17 +00:00
}
};