Add logging and fix channel merging and removing
This commit is contained in:
@@ -140,6 +140,21 @@ export class MainView extends View {
|
||||
}
|
||||
const d = new ChannelDialog(state.currentChannel!);
|
||||
d.open().then((chan) => {
|
||||
if (!chan) {
|
||||
state.removeChannel(state.currentChannel!);
|
||||
state.currentChannel = null;
|
||||
this.updateChannelList();
|
||||
state.save();
|
||||
if (state.channelList.channels.length > 0) {
|
||||
return this.switchChannel(state.channelList.channels[0].id.toString());
|
||||
} else {
|
||||
return this.createNewChannel();
|
||||
}
|
||||
}
|
||||
if (chan.messages.length < 1) {
|
||||
this.renderInitialMessageList(true);
|
||||
this.syncMessages();
|
||||
}
|
||||
state.save();
|
||||
this.updateChannelList();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user