Skip to content

Commit 3468329

Browse files
Merge pull request #121 from nullinside-development-group/feat/skip
fix: crash when skipping messages in deployed version
2 parents cf3f472 + 7573fcb commit 3468329

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/TwitchStreamingTools/Services/TwitchTtsService.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,14 @@ private void OnKeystroke(Keybind keybind) {
9393
keybind.IsAlt == skip.IsAlt &&
9494
keybind.IsCtrl == skip.IsCtrl &&
9595
keybind.IsShift == skip.IsShift) {
96-
foreach (TwitchChatTts chat in _chats) {
97-
chat.SkipCurrentTts();
96+
var chats = _chats.ToList();
97+
foreach (TwitchChatTts chat in chats) {
98+
try {
99+
chat.SkipCurrentTts();
100+
}
101+
catch {
102+
// Do nothing, just try to skip the best we can.
103+
}
98104
}
99105
}
100106
}

src/TwitchStreamingTools/ViewModels/Pages/SettingsView/TtsSkipUsernamesViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,8 @@ private async void UserListRefreshTimer_OnElapsed(object sender, ElapsedEventArg
182182
_userListRefreshTimer.Interval = 5000;
183183
_userListRefreshTimer.Start();
184184
}
185-
catch (Exception ex) {
185+
catch {
186186
// do nothing don't crash
187-
LOG.Error("Failed to refresh user list", ex);
188187
}
189188
}
190189
}

0 commit comments

Comments
 (0)