summaryrefslogtreecommitdiff
path: root/pkg/ui/views/play.go
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2025-04-17 17:46:39 +0200
committerSanto Cariotti <santo@dcariotti.me>2025-04-17 17:46:39 +0200
commit9cd48c660231592f3f8d9a035d45b568d987616e (patch)
tree5d6adb401f1697a78230f9931e9682be30cbdf95 /pkg/ui/views/play.go
parent3ad0d21e072c7461ea78a9a85111e6e19d3b0632 (diff)
Show icon for win/lose/draw on play landing page
Diffstat (limited to 'pkg/ui/views/play.go')
-rw-r--r--pkg/ui/views/play.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/ui/views/play.go b/pkg/ui/views/play.go
index a205c25..ed5f1e1 100644
--- a/pkg/ui/views/play.go
+++ b/pkg/ui/views/play.go
@@ -40,6 +40,7 @@ type PlayModel struct {
paginator paginator.Model
// Game state
+ userID int
playName string
currentGameId int
game *database.Game
@@ -85,6 +86,7 @@ func (m PlayModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case database.Game:
return m.handleGameResponse(msg)
case []database.Game:
+ m.userID, m.err = getUserID()
return m.handleGamesResponse(msg)
case StartGameMsg:
return m, SwitchModelCmd(NewGameModel(m.width, m.height+1, "peer-2", m.currentGameId, m.network))