channels share maps now

This commit is contained in:
MathMan05
2025-12-18 19:59:10 -06:00
parent c9d908c246
commit af13dbb974
2 changed files with 9 additions and 3 deletions

View File

@@ -60,9 +60,9 @@ class Channel extends SnowFlake {
static contextmenu = new Contextmenu<Channel, undefined>("channel menu");
replyingto!: Message | null;
infinite!: InfiniteScroller;
idToPrev: Map<string, string | undefined> = new Map();
idToNext: Map<string, string | undefined> = new Map();
messages: Map<string, Message> = new Map();
idToPrev: Map<string, string | undefined>;
idToNext: Map<string, string | undefined>;
messages: Map<string, Message>;
voice?: Voice;
bitrate: number = 128000;
@@ -489,6 +489,9 @@ class Channel extends SnowFlake {
last_pin_timestamp?: string;
constructor(json: channeljson | -1, owner: Guild, id: string = json === -1 ? "" : json.id) {
super(id);
this.idToNext = owner.localuser.idToNext;
this.idToPrev = owner.localuser.idToPrev;
this.messages = owner.localuser.messages;
this.owner = owner;
this.headers = this.owner.headers;

View File

@@ -70,6 +70,9 @@ class Localuser {
guilds!: Guild[];
guildids: Map<string, Guild> = new Map();
user!: User;
idToPrev: Map<string, string | undefined> = new Map();
idToNext: Map<string, string | undefined> = new Map();
messages: Map<string, Message> = new Map();
get status() {
return this.user.status;
}