diff options
Diffstat (limited to 'helpfuncs.go')
| -rw-r--r-- | helpfuncs.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/helpfuncs.go b/helpfuncs.go index 538b4aa..b6b5faa 100644 --- a/helpfuncs.go +++ b/helpfuncs.go @@ -45,6 +45,18 @@ func refreshChatDisplay() { }) } +func stopTTSIfNotForUser(msg *models.RoleMsg) { + viewingAs := cfg.UserRole + if cfg.WriteNextMsgAs != "" { + viewingAs = cfg.WriteNextMsgAs + } + // stop tts if msg is not for user + if cfg.CharSpecificContextEnabled && + !slices.Contains(msg.KnownTo, viewingAs) && cfg.TTS_ENABLED { + TTSDoneChan <- true + } +} + func colorText() { text := textView.GetText(false) quoteReplacer := strings.NewReplacer( |
