underbbs/frontend/ts/adapter.ts

23 lines
710 B
TypeScript
Raw Normal View History

2024-06-30 00:18:31 +00:00
import {Message, Author} from "./message"
export class AdapterData {
public protocol: string;
public directMessages: Map<string, Message>;
public messages: Map<string, Message>;
2024-06-30 00:18:31 +00:00
public profileCache: Map<string, Author>;
public convoyCache: Map<string, string>;
2024-06-30 00:18:31 +00:00
constructor(protocol: string) {
this.protocol = protocol;
this.messages = new Map<string, Message>();
this.directMessages = new Map<string, Message>();
this.profileCache = new Map<string, Author>();
this.convoyCache = new Map<string, string>();
2024-04-27 22:39:53 +00:00
}
2024-04-27 16:50:27 +00:00
}
export class AdapterState {
public data: Map<string, AdapterData> = new Map<string, AdapterData>();
static _instance: AdapterState = new AdapterState();
}