Skip to content

Commit

Permalink
go fmt...
Browse files Browse the repository at this point in the history
  • Loading branch information
mixmasala committed Jul 4, 2024
1 parent 97c7781 commit 6f05edf
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 33 deletions.
2 changes: 1 addition & 1 deletion contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"gioui.org/widget/material"
"github.com/benc-uk/gofract/pkg/colors"
"github.com/benc-uk/gofract/pkg/fractals"
"github.com/katzenpost/katzenpost/catshadow"
"github.com/katzenpost/hpqc/rand"
"github.com/katzenpost/katzenpost/catshadow"
qrcode "github.com/skip2/go-qrcode"
"golang.org/x/exp/shiny/materialdesign/icons"
"image"
Expand Down
33 changes: 17 additions & 16 deletions home.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package main
import (
"bytes"
"encoding/base64"
"gioui.org/font"
"gioui.org/gesture"
"gioui.org/io/key"
"gioui.org/layout"
"gioui.org/op/clip"
"gioui.org/op/paint"
"gioui.org/font"
"gioui.org/unit"
"gioui.org/widget"
"gioui.org/widget/material"
Expand Down Expand Up @@ -149,21 +149,22 @@ func (p *HomePage) Layout(gtx layout.Context) layout.Dimensions {
}),
layout.Rigid(func(gtx C) D {
return layout.Flex{Axis: layout.Vertical, Alignment: layout.Start, Spacing: layout.SpaceEnd}.Layout(gtx,
layout.Rigid(func(gtx C) D {
if contacts[i].IsPending {
return pandaIcon.Layout(gtx, th.Palette.ContrastBg)
}
return fill{th.Bg}.Layout(gtx)
}),
layout.Rigid(func(gtx C) D {
// timestamp
if lastMsg != nil {
messageAge := strings.Replace(durafmt.ParseShort(time.Now().Round(0).Sub(lastMsg.Timestamp).Truncate(time.Minute)).Format(units), "0 s", "now", 1)
return material.Caption(th, messageAge).Layout(gtx)
}
return fill{th.Bg}.Layout(gtx)
}),
)}),
layout.Rigid(func(gtx C) D {
if contacts[i].IsPending {
return pandaIcon.Layout(gtx, th.Palette.ContrastBg)
}
return fill{th.Bg}.Layout(gtx)
}),
layout.Rigid(func(gtx C) D {
// timestamp
if lastMsg != nil {
messageAge := strings.Replace(durafmt.ParseShort(time.Now().Round(0).Sub(lastMsg.Timestamp).Truncate(time.Minute)).Format(units), "0 s", "now", 1)
return material.Caption(th, messageAge).Layout(gtx)
}
return fill{th.Bg}.Layout(gtx)
}),
)
}),
)
}),
// last message
Expand Down
2 changes: 1 addition & 1 deletion katzen.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
_ "gioui.org/app/permission/foreground"
_ "gioui.org/app/permission/storage"
"gioui.org/font/gofont"
"gioui.org/text"
"gioui.org/io/key"
"gioui.org/io/system"
"gioui.org/layout"
"gioui.org/op"
"gioui.org/text"
"gioui.org/unit"
"gioui.org/widget/material"
"gioui.org/x/notify"
Expand Down
30 changes: 15 additions & 15 deletions spool.go
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
package main

import (
"gioui.org/gesture"
"gioui.org/layout"
"time"
"gioui.org/op/clip"
"gioui.org/x/notify"
"gioui.org/widget"
"sync"
"image"
"gioui.org/gesture"
"gioui.org/unit"
"gioui.org/widget"
"gioui.org/widget/material"
"gioui.org/x/notify"
"github.com/katzenpost/katzenpost/catshadow"
"image"
"sync"
"time"
//"gioui.org/widget/material"
)

type SpoolPage struct {
a *App
provider *layout.List
a *App
provider *layout.List
providerClicks map[string]*gesture.Click
connect *widget.Clickable
settings *widget.Clickable
back *widget.Clickable
submit *widget.Clickable
once *sync.Once
errCh chan error
connect *widget.Clickable
settings *widget.Clickable
back *widget.Clickable
submit *widget.Clickable
once *sync.Once
errCh chan error
}

func (p *SpoolPage) Start(stop <-chan struct{}) {
Expand Down Expand Up @@ -135,7 +135,7 @@ func (p *SpoolPage) Event(gtx layout.Context) interface{} {
if e.Type == gesture.TypeClick {
provider := provider // copy reference to provider
go p.once.Do(func() {
select{
select {
case p.errCh <- p.a.c.CreateRemoteSpoolOn(provider):
case <-p.a.c.HaltCh():
return
Expand Down

0 comments on commit 6f05edf

Please sign in to comment.