Skip to content

Commit

Permalink
modules: fix switcher_only modules not being used when setting explic…
Browse files Browse the repository at this point in the history
…itly
  • Loading branch information
abenz1267 committed Feb 7, 2025
1 parent 05bfa4a commit a2203f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.12.15-git
0.12.15
1 change: 1 addition & 0 deletions internal/config/config.default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ switcher_only = true
delay = 1000
weight = 5
name = "translation"
icon = "accessories-dictionary"
placeholder = "Translation"
switcher_only = true
provider = "googlefree"
18 changes: 10 additions & 8 deletions internal/ui/interactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,15 +728,17 @@ func processAsync(text string) {
if len(p) > 1 {
prefix := p[k].General().Prefix

if p[k].General().SwitcherOnly {
if prefix == "" {
wg.Done()
continue
}
if len(appstate.ExplicitModules) == 0 {
if p[k].General().SwitcherOnly {
if prefix == "" {
wg.Done()
continue
}

if !strings.HasPrefix(text, prefix) {
wg.Done()
continue
if !strings.HasPrefix(text, prefix) {
wg.Done()
continue
}
}
}

Expand Down

0 comments on commit a2203f9

Please sign in to comment.