Commit 07b3a66
authored
fix: session status stuck on Connection in progress on devices without GMS (#1092)
* fix: seed initial push tokens and call state in SessionStatusCubit
On devices without Google Mobile Services (e.g. Huawei), PushTokensBloc
never emits after initialization because GMS availability check returns a
terminal status and aborts token retrieval without emitting any state.
As a result, _lastPushTokensState remained null indefinitely, causing
the condition `pushTokens != null && call != null` in _emitCombinedStatus
to never pass — so the UI was stuck at SessionStatus.inProgress regardless
of the actual signaling/registration state.
Fix: seed _lastPushTokensState and _lastCallState from the blocs' initial
states in the constructor, so subsequent _onCallChanged callbacks can
emit the correct status even when PushTokensBloc never emits.
* refactor: remove unused optional params from _emitCombinedStatus1 parent 0398512 commit 07b3a66
1 file changed
Lines changed: 6 additions & 4 deletions
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | | - | |
45 | | - | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
0 commit comments