mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-23 03:25:07 +03:00
Hide the profile picture and username in DMs
This commit is contained in:
@@ -28,6 +28,10 @@ export class DMPanel extends MessagePanel {
|
||||
super("dm", user, callbacks, onStateChange);
|
||||
}
|
||||
|
||||
isDm(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
async activate(): Promise<void> {
|
||||
if (this.dmData && !this.messagesLoaded) {
|
||||
await this.loadMessages();
|
||||
|
||||
@@ -49,6 +49,7 @@ export abstract class MessagePanel {
|
||||
abstract deactivate(): void;
|
||||
abstract loadMessages(): Promise<void>;
|
||||
abstract sendMessage(content: string): Promise<void>;
|
||||
abstract isDm(): boolean;
|
||||
|
||||
// Common methods
|
||||
protected updateState(updates: Partial<MessagePanelState>): void {
|
||||
|
||||
@@ -23,6 +23,10 @@ export class PublicChatPanel extends MessagePanel {
|
||||
});
|
||||
}
|
||||
|
||||
isDm(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
async activate(): Promise<void> {
|
||||
if (!this.messagesLoaded) {
|
||||
await this.loadMessages();
|
||||
|
||||
Reference in New Issue
Block a user