aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/fuzzy-search-modal.go6
-rw-r--r--ui/room-list.go6
-rw-r--r--ui/widget/center.go10
-rw-r--r--ui/widget/util.go2
4 files changed, 12 insertions, 12 deletions
diff --git a/ui/fuzzy-search-modal.go b/ui/fuzzy-search-modal.go
index 4b77ca8..8ea6bbb 100644
--- a/ui/fuzzy-search-modal.go
+++ b/ui/fuzzy-search-modal.go
@@ -22,17 +22,17 @@ import (
"strconv"
"github.com/evidlo/fuzzysearch/fuzzy"
+ "maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/widget"
- "maunium.net/go/tview"
"maunium.net/go/tcell"
- "maunium.net/go/gomuks/debug"
+ "maunium.net/go/tview"
)
type FuzzySearchModal struct {
tview.Primitive
- search *tview.InputField
+ search *tview.InputField
results *tview.TextView
matches fuzzy.Ranks
diff --git a/ui/room-list.go b/ui/room-list.go
index 0bf44e4..75d874f 100644
--- a/ui/room-list.go
+++ b/ui/room-list.go
@@ -22,12 +22,12 @@ import (
"strconv"
"strings"
+ "math"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/widget"
"maunium.net/go/tcell"
"maunium.net/go/tview"
- "math"
)
type orderedRoom struct {
@@ -446,7 +446,7 @@ func (list *RoomList) Previous() (string, *rooms.Room) {
indexInvisible := tagRoomList.Index(list.selected)
if index == -1 && indexInvisible >= 0 {
num := tagRoomList.TotalLength() - indexInvisible
- tagRoomList.maxShown = int(math.Ceil(float64(num) / 10.0) * 10.0)
+ tagRoomList.maxShown = int(math.Ceil(float64(num)/10.0) * 10.0)
index = tagRoomList.IndexVisible(list.selected)
}
@@ -479,7 +479,7 @@ func (list *RoomList) Next() (string, *rooms.Room) {
indexInvisible := tagRoomList.Index(list.selected)
if index == -1 && indexInvisible >= 0 {
num := tagRoomList.TotalLength() - indexInvisible + 1
- tagRoomList.maxShown = int(math.Ceil(float64(num) / 10.0) * 10.0)
+ tagRoomList.maxShown = int(math.Ceil(float64(num)/10.0) * 10.0)
index = tagRoomList.IndexVisible(list.selected)
}
diff --git a/ui/widget/center.go b/ui/widget/center.go
index 48e6153..07dbfd7 100644
--- a/ui/widget/center.go
+++ b/ui/widget/center.go
@@ -17,8 +17,8 @@
package widget
import (
- "maunium.net/go/tview"
"maunium.net/go/tcell"
+ "maunium.net/go/tview"
)
// Center wraps the given tview primitive into a Flex element in order to
@@ -37,15 +37,15 @@ func Center(width, height int, p tview.Primitive) tview.Primitive {
type transparentCenter struct {
*tview.Box
prefWidth, prefHeight int
- p tview.Primitive
+ p tview.Primitive
}
func TransparentCenter(width, height int, p tview.Primitive) tview.Primitive {
return &transparentCenter{
- Box: tview.NewBox(),
- prefWidth: width,
+ Box: tview.NewBox(),
+ prefWidth: width,
prefHeight: height,
- p: p,
+ p: p,
}
}
diff --git a/ui/widget/util.go b/ui/widget/util.go
index cd4f99f..cd1fcd0 100644
--- a/ui/widget/util.go
+++ b/ui/widget/util.go
@@ -17,10 +17,10 @@
package widget
import (
+ "fmt"
"github.com/mattn/go-runewidth"
"maunium.net/go/tcell"
"maunium.net/go/tview"
- "fmt"
"strconv"
)