|
|
|
@ -23,7 +23,7 @@ import { Devs } from "@utils/constants";
|
|
|
|
|
import { ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
|
|
|
|
import definePlugin, { OptionType } from "@utils/types";
|
|
|
|
|
import { waitFor } from "@webpack";
|
|
|
|
|
import { Button, ChannelStore, Text } from "@webpack/common";
|
|
|
|
|
import { Button, ChannelStore, SnowflakeUtils, Text } from "@webpack/common";
|
|
|
|
|
|
|
|
|
|
const CONNECT = 1048576n;
|
|
|
|
|
const VIEW_CHANNEL = 1024n;
|
|
|
|
@ -117,7 +117,7 @@ export default definePlugin({
|
|
|
|
|
const isHidden = this.isHiddenChannel(channel);
|
|
|
|
|
// check for type again, otherwise it would show it for hidden stage channels
|
|
|
|
|
if (channel.type === 0 && isHidden) {
|
|
|
|
|
const lastMessageDate = channel.lastActiveTimestamp ? new Date(channel.lastActiveTimestamp).toLocaleString() : null;
|
|
|
|
|
const lastMessageDate = channel.lastMessageId ? new Date(SnowflakeUtils.extractTimestamp(channel.lastMessageId)).toLocaleString() : null;
|
|
|
|
|
openModal(modalProps => (
|
|
|
|
|
<ModalRoot size={ModalSize.SMALL} {...modalProps}>
|
|
|
|
|
<ModalHeader>
|
|
|
|
|