apps/gophers: upgrade to changed input api

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-12 00:07:18 +02:00
parent a22bcfc88c
commit 96b52d3493
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ module gioui.org/apps
go 1.12
require (
gioui.org/ui v0.0.0-20190711181310-0d49eb3f4b31
gioui.org/ui v0.0.0-20190711220556-a22bcfc88c89
github.com/google/go-github/v24 v24.0.1
golang.org/x/exp v0.0.0-20190627132806-fd42eb6b336f
golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9
+4 -4
View File
@@ -52,7 +52,7 @@ type App struct {
cfg app.Config
faces *measure.Faces
inputs *input.Queue
inputs *input.Router
fab *ActionButton
@@ -99,7 +99,7 @@ type redrawer func()
type ActionButton struct {
config ui.Config
inputs input.Events
inputs input.Queue
face text.Face
Open bool
icons []*icon
@@ -262,7 +262,7 @@ func newApp(w *app.Window) *App {
a := &App{
w: w,
updateUsers: make(chan []*user),
inputs: new(input.Queue),
inputs: new(input.Router),
}
a.faces = &measure.Faces{Config: &a.cfg}
a.usersList = &layout.List{
@@ -400,7 +400,7 @@ func (a *App) face(f *sfnt.Font, size float32) text.Face {
func (a *App) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
for i := range a.userClicks {
click := &a.userClicks[i]
for e, ok := click.Next(a.inputs); ok; e, ok = click.Next(a.inputs) {
for _, e := range click.Events(a.inputs) {
if e.Type == gesture.TypeClick {
a.selectedUser = a.newUserPage(a.users[i])
}