diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-08 03:34:38 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-08 03:34:38 +0100 |
| commit | 408fac5c545c4294c81df5fff36b2fed19d7fe55 (patch) | |
| tree | ef5a05d8099a1531f88cd3e5008225ea47910fc4 /src/client | |
| parent | web: accept the serialized reels array and stop game loops on navigation (diff) | |
| download | zagan-bet-408fac5c545c4294c81df5fff36b2fed19d7fe55.tar.gz zagan-bet-408fac5c545c4294c81df5fff36b2fed19d7fe55.zip | |
web: restore the balance on a refresh into history
The gateway hello now carries the core's last known balance alongside the user, so a refresh on a non-game view does not blank the header before the next INFO reply.
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/core.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/core.rs b/src/client/core.rs index 278dc00..f120fa1 100644 --- a/src/client/core.rs +++ b/src/client/core.rs | |||
| @@ -139,6 +139,10 @@ impl ClientCore { | |||
| 139 | self.game.set_balance(balance); | 139 | self.game.set_balance(balance); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | pub fn balance(&self) -> Option<i64> { | ||
| 143 | self.balance | ||
| 144 | } | ||
| 145 | |||
| 142 | pub fn set_host_info(&mut self, host: Option<String>, fingerprint: Option<String>) { | 146 | pub fn set_host_info(&mut self, host: Option<String>, fingerprint: Option<String>) { |
| 143 | self.host = host; | 147 | self.host = host; |
| 144 | self.fingerprint = fingerprint; | 148 | self.fingerprint = fingerprint; |
