Skip to content

Commit 987cd08

Browse files
fix: chat not disconnecting
closes#11
1 parent a0dd958 commit 987cd08

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/TwitchStreamingTools/Services/AccountManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public void DeleteCredentials() {
9696
_twitchClient.TwitchUsername = null;
9797
CredentialsAreValid = false;
9898
TwitchUsername = null;
99+
Configuration.Instance.WriteConfiguration();
99100

100101
OnCredentialsChanged?.Invoke(null);
101102
OnCredentialsStatusChanged?.Invoke(false);

src/TwitchStreamingTools/ViewModels/Pages/ChatViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ public ChatViewModel(ITwitchClientProxy twitchClient) {
6868
Configuration.Instance.WriteConfiguration();
6969
});
7070

71-
OnRemoveChat = ReactiveCommand.Create<string>(s => {
72-
_selectedTwitchChatNames.Remove(s);
73-
// todo: disconnect from chat
71+
OnRemoveChat = ReactiveCommand.Create<string>(channel => {
72+
_selectedTwitchChatNames.Remove(channel);
73+
_twitchClient.RemoveMessageCallback(channel, OnChatMessage);
7474
Configuration.Instance.TwitchChats = _selectedTwitchChatNames;
7575
Configuration.Instance.WriteConfiguration();
7676
});

0 commit comments

Comments
 (0)