mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-23 03:25:07 +03:00
Clean up imports
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import { MessagePanel, type MessagePanelCallbacks } from "./MessagePanel";
|
||||
import {
|
||||
fetchUserPublicKey,
|
||||
fetchDMHistory,
|
||||
decryptDm,
|
||||
sendDMViaWebSocket
|
||||
} from "../../api/dmApi";
|
||||
import type { Message, DmEnvelope } from "../../core/types";
|
||||
import type { Message } from "../../core/types";
|
||||
import type { UserState } from "../state";
|
||||
|
||||
export interface DMPanelData {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { User, Message } from "../../core/types";
|
||||
import type { Message } from "../../core/types";
|
||||
import type { UserState } from "../state";
|
||||
|
||||
export interface MessagePanelState {
|
||||
|
||||
@@ -6,7 +6,6 @@ import type { Message, WebSocketMessage } from "../../core/types";
|
||||
import type { UserState } from "../state";
|
||||
|
||||
export class PublicChatPanel extends MessagePanel {
|
||||
private chatName: string;
|
||||
private messagesLoaded: boolean = false;
|
||||
|
||||
constructor(
|
||||
@@ -16,7 +15,6 @@ export class PublicChatPanel extends MessagePanel {
|
||||
onStateChange: (state: any) => void
|
||||
) {
|
||||
super(`public-${chatName}`, currentUser, callbacks, onStateChange);
|
||||
this.chatName = chatName;
|
||||
this.updateState({
|
||||
title: chatName,
|
||||
online: true // Public chats are always "online"
|
||||
@@ -113,7 +111,6 @@ export class PublicChatPanel extends MessagePanel {
|
||||
|
||||
// Update chat name
|
||||
setChatName(chatName: string): void {
|
||||
this.chatName = chatName;
|
||||
this.updateState({
|
||||
id: `public-${chatName}`,
|
||||
title: chatName
|
||||
|
||||
Reference in New Issue
Block a user