diff --git a/cmd/chatview.go b/cmd/chatview.go index 64ba5ae..816eb25 100644 --- a/cmd/chatview.go +++ b/cmd/chatview.go @@ -35,7 +35,7 @@ type chatView struct { } func newChatView(app *tview.Application, cfg *config.Config) *chatView { - cv := &chatView{ + chatView := &chatView{ Pages: tview.NewPages(), mainFlex: tview.NewFlex(), @@ -49,10 +49,10 @@ func newChatView(app *tview.Application, cfg *config.Config) *chatView { cfg: cfg, } - cv.SetInputCapture(cv.onInputCapture) + chatView.SetInputCapture(chatView.onInputCapture) - cv.buildLayout() - return cv + chatView.buildLayout() + return chatView } func (cv *chatView) buildLayout() { diff --git a/internal/login/qr.go b/internal/login/qr.go index 2b3b4f9..c6cd681 100644 --- a/internal/login/qr.go +++ b/internal/login/qr.go @@ -363,14 +363,14 @@ func renderQR(content string) (string, error) { if err != nil { return "", err } - bm := code.Bitmap() + bitmap := code.Bitmap() var b strings.Builder - for y := 0; y < len(bm); y += 2 { - for x := range bm[y] { - top := bm[y][x] + for y := 0; y < len(bitmap); y += 2 { + for x := range bitmap[y] { + top := bitmap[y][x] bottom := false - if y+1 < len(bm) { - bottom = bm[y+1][x] + if y+1 < len(bitmap) { + bottom = bitmap[y+1][x] } if top && bottom { b.WriteString("█") diff --git a/internal/notifications/desktop_toast_darwin.go b/internal/notifications/desktop_toast_darwin.go index a40fbff..0466e00 100644 --- a/internal/notifications/desktop_toast_darwin.go +++ b/internal/notifications/desktop_toast_darwin.go @@ -7,13 +7,13 @@ import ( ) func sendDesktopNotification(title string, message string, image string, playSound bool, _ int) error { - n := gosxnotifier.NewNotification(message) - n.Title = title - n.ContentImage = image + notification := gosxnotifier.NewNotification(message) + notification.Title = title + notification.ContentImage = image if playSound { - n.Sound = gosxnotifier.Default + notification.Sound = gosxnotifier.Default } - return n.Push() + return notification.Push() } diff --git a/internal/ui/util.go b/internal/ui/util.go index d0cf3b8..e2dac5f 100644 --- a/internal/ui/util.go +++ b/internal/ui/util.go @@ -15,11 +15,11 @@ func ConfigureBox(box *tview.Box, cfg *config.Theme) *tview.Box { normalBorderStyle, activeBorderStyle := border.NormalStyle.Style, border.ActiveStyle.Style normalBorderSet, activeBorderSet := border.NormalSet.BorderSet, border.ActiveSet.BorderSet normalTitleStyle, activeTitleStyle := title.NormalStyle.Style, title.ActiveStyle.Style - p := border.Padding + padding := border.Padding box. SetBorderStyle(normalBorderStyle). SetBorderSet(normalBorderSet). - SetBorderPadding(p[0], p[1], p[2], p[3]). + SetBorderPadding(padding[0], padding[1], padding[2], padding[3]). SetTitleStyle(normalTitleStyle). SetTitleAlignment(title.Alignment.Alignment). SetBlurFunc(func() {