prepare loader ui

This commit is contained in:
Ilia Denisov
2026-03-15 20:40:25 +02:00
parent 1ea03495f6
commit fbcf4cef99
8 changed files with 191 additions and 57 deletions
+3 -4
View File
@@ -1,7 +1,6 @@
package client
import (
"context"
"image"
"sync"
@@ -70,7 +69,7 @@ type client struct {
hits []world.Hit
}
func NewClient(ctx context.Context, s storage.UIStorage, conn connector.UIConnector, app fyne.App) (mc.Client, error) {
func NewClient(s storage.UIStorage, conn connector.UIConnector, app fyne.App) (mc.Client, error) {
e := &client{
s: s,
conn: conn,
@@ -85,7 +84,7 @@ func NewClient(ctx context.Context, s storage.UIStorage, conn connector.UIConnec
hits: make([]world.Hit, 5),
}
e.loadReportFunc = func(t uint) { e.loadReport(ctx, t) }
e.loadReportFunc = e.loadReport
e.drawer = &world.GGDrawer{DC: nil}
@@ -106,7 +105,7 @@ func NewClient(ctx context.Context, s storage.UIStorage, conn connector.UIConnec
return e, nil
}
func (e *client) loadReport(ctx context.Context, t uint) {
func (e *client) loadReport(t uint) {
e.conn.FetchReport("GAME_ID", t, func(r report.Report, err error) {
if err != nil {
e.handlerError(err)