Fixed compile errors
This commit is contained in:
parent
cd392ec54f
commit
8b592391ec
3 changed files with 30 additions and 21 deletions
|
@ -16,6 +16,7 @@ import {
|
||||||
import {ConversationPanel} from "../../../ui/frames/side/ConversationUI";
|
import {ConversationPanel} from "../../../ui/frames/side/ConversationUI";
|
||||||
import {AbstractChat, AbstractChatManager, kMaxChatFrameMessageSize} from "./AbstractConversion";
|
import {AbstractChat, AbstractChatManager, kMaxChatFrameMessageSize} from "./AbstractConversion";
|
||||||
import {ErrorCode} from "../../../connection/ErrorCode";
|
import {ErrorCode} from "../../../connection/ErrorCode";
|
||||||
|
import {LocalClientEntry} from "tc-shared/tree/Client";
|
||||||
|
|
||||||
const kSuccessQueryThrottle = 5 * 1000;
|
const kSuccessQueryThrottle = 5 * 1000;
|
||||||
const kErrorQueryThrottle = 30 * 1000;
|
const kErrorQueryThrottle = 30 * 1000;
|
||||||
|
@ -327,9 +328,11 @@ export class ConversationManager extends AbstractChatManager<ConversationUIEvent
|
||||||
this.handlePanelShow();
|
this.handlePanelShow();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
connection.events().one("notify_handler_initialized", () => this.uiEvents.on("notify_destroy", connection.getClient().events.on("notify_client_moved", event => {
|
connection.events().one("notify_handler_initialized", () => this.uiEvents.on("notify_destroy", connection.channelTree.events.on("notify_client_moved", event => {
|
||||||
|
if(event.client instanceof LocalClientEntry) {
|
||||||
this.findOrCreateConversation(event.oldChannel.channelId).localClientSwitchedChannel("leave");
|
this.findOrCreateConversation(event.oldChannel.channelId).localClientSwitchedChannel("leave");
|
||||||
this.findOrCreateConversation(event.newChannel.channelId).localClientSwitchedChannel("join");
|
this.findOrCreateConversation(event.newChannel.channelId).localClientSwitchedChannel("join");
|
||||||
|
}
|
||||||
})));
|
})));
|
||||||
|
|
||||||
this.uiEvents.register_handler(this, true);
|
this.uiEvents.register_handler(this, true);
|
||||||
|
|
|
@ -18,6 +18,7 @@ import * as log from "../../../log";
|
||||||
import {LogCategory} from "../../../log";
|
import {LogCategory} from "../../../log";
|
||||||
import {queryConversationEvents, registerConversationEvent} from "../../../ui/frames/side/PrivateConversationHistory";
|
import {queryConversationEvents, registerConversationEvent} from "../../../ui/frames/side/PrivateConversationHistory";
|
||||||
import {AbstractChat, AbstractChatManager} from "../../../ui/frames/side/AbstractConversion";
|
import {AbstractChat, AbstractChatManager} from "../../../ui/frames/side/AbstractConversion";
|
||||||
|
import {ChannelTreeEvents} from "tc-shared/tree/ChannelTree";
|
||||||
|
|
||||||
export type OutOfViewClient = {
|
export type OutOfViewClient = {
|
||||||
nickname: string,
|
nickname: string,
|
||||||
|
@ -181,10 +182,12 @@ export class PrivateConversation extends AbstractChat<PrivateConversationUIEvent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private registerClientEvents(client: ClientEntry) {
|
handleEventLeftView(event: ChannelTreeEvents["notify_client_leave_view"]) {
|
||||||
this.activeClientListener = [];
|
if(event.client !== this.activeClient) {
|
||||||
this.activeClientListener.push(client.events.on("notify_left_view", event => {
|
return;
|
||||||
if(event.serverLeave) {
|
}
|
||||||
|
|
||||||
|
if(event.isServerLeave) {
|
||||||
this.setActiveClientEntry(undefined);
|
this.setActiveClientEntry(undefined);
|
||||||
this.registerChatEvent({
|
this.registerChatEvent({
|
||||||
type: "partner-action",
|
type: "partner-action",
|
||||||
|
@ -194,12 +197,15 @@ export class PrivateConversation extends AbstractChat<PrivateConversationUIEvent
|
||||||
}, true);
|
}, true);
|
||||||
} else {
|
} else {
|
||||||
this.setActiveClientEntry({
|
this.setActiveClientEntry({
|
||||||
uniqueId: client.clientUid(),
|
uniqueId: event.client.clientUid(),
|
||||||
nickname: client.clientNickName(),
|
nickname: event.client.clientNickName(),
|
||||||
clientId: client.clientId()
|
clientId: event.client.clientId()
|
||||||
} as OutOfViewClient)
|
} as OutOfViewClient)
|
||||||
}
|
}
|
||||||
}));
|
}
|
||||||
|
|
||||||
|
private registerClientEvents(client: ClientEntry) {
|
||||||
|
this.activeClientListener = [];
|
||||||
this.activeClientListener.push(client.events.on("notify_properties_updated", event => {
|
this.activeClientListener.push(client.events.on("notify_properties_updated", event => {
|
||||||
if('client_nickname' in event.updated_properties)
|
if('client_nickname' in event.updated_properties)
|
||||||
this.updateClientInfo();
|
this.updateClientInfo();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {ReactComponentBase} from "tc-shared/ui/react-elements/ReactComponentBase";
|
import {ReactComponentBase} from "tc-shared/ui/react-elements/ReactComponentBase";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as ReactDOM from "react-dom";
|
import * as ReactDOM from "react-dom";
|
||||||
import {ChannelTreeView} from "./RendererView.tsx.old";
|
import {ChannelTreeView} from "tc-shared/ui/tree/RendererView";
|
||||||
|
|
||||||
const moveStyle = require("./TreeEntryMove.scss");
|
const moveStyle = require("./TreeEntryMove.scss");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue