mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
all: clean up code, upgrade to modern Go
Signed-off-by: ddkwork
This commit is contained in:
+3
-4
@@ -4,6 +4,7 @@ package input
|
||||
|
||||
import (
|
||||
"image"
|
||||
"slices"
|
||||
"sort"
|
||||
|
||||
"gioui.org/f32"
|
||||
@@ -304,10 +305,8 @@ func (s keyState) softKeyboard(show bool) keyState {
|
||||
}
|
||||
|
||||
func (k *keyFilter) Add(f key.Filter) {
|
||||
for _, f2 := range *k {
|
||||
if f == f2 {
|
||||
return
|
||||
}
|
||||
if slices.Contains(*k, f) {
|
||||
return
|
||||
}
|
||||
*k = append(*k, f)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user