File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,6 @@ class BroadcastAnalysisController extends AsyncNotifier<BroadcastAnalysisState>
8787
8888 _subscription = _socketClient.stream.listen (_handleSocketEvent);
8989
90- await _socketClient.firstConnection;
91-
9290 _socketOpenSubscription = _socketClient.connectedStream.listen ((_) {
9391 if (state.value? .isNewOrOngoing == true ) {
9492 _syncDebouncer (() {
@@ -97,6 +95,8 @@ class BroadcastAnalysisController extends AsyncNotifier<BroadcastAnalysisState>
9795 }
9896 });
9997
98+ await _socketClient.firstConnection;
99+
100100 _appLifecycleListener = AppLifecycleListener (
101101 onResume: () {
102102 if (state.value? .isNewOrOngoing == true ) {
Original file line number Diff line number Diff line change @@ -62,8 +62,6 @@ class BroadcastRoundController extends AsyncNotifier<BroadcastRoundState> {
6262
6363 _subscription = _socketClient.stream.listen (_handleSocketEvent);
6464
65- await _socketClient.firstConnection;
66-
6765 _socketOpenSubscription = _socketClient.connectedStream.listen ((_) {
6866 if (ref.mounted && state.value? .round.status == RoundStatus .live) {
6967 _syncRoundDebouncer (() {
@@ -72,6 +70,8 @@ class BroadcastRoundController extends AsyncNotifier<BroadcastRoundState> {
7270 }
7371 });
7472
73+ await _socketClient.firstConnection;
74+
7575 _appLifecycleListener = AppLifecycleListener (
7676 onResume: () {
7777 if (ref.mounted && state.value? .round.status == RoundStatus .live) {
Original file line number Diff line number Diff line change @@ -53,9 +53,6 @@ class LiveTvChannels extends AsyncNotifier<LiveTvChannelsState> {
5353
5454 _socketClient = ref.read (socketPoolProvider).open (Uri (path: kDefaultSocketRoute));
5555
56- await _socketClient.firstConnection;
57- _socketWatch (repoGames);
58-
5956 _socketReadySubscription? .cancel ();
6057 _socketReadySubscription = _socketClient.connectedStream.listen ((_) async {
6158 final repoGames = await ref.read (tvRepositoryProvider).channels ();
@@ -65,6 +62,9 @@ class LiveTvChannels extends AsyncNotifier<LiveTvChannelsState> {
6562 _socketSubscription? .cancel ();
6663 _socketSubscription = _socketClient.stream.listen (_handleSocketEvent);
6764
65+ await _socketClient.firstConnection;
66+ _socketWatch (repoGames);
67+
6868 return repoGames.map ((channel, game) {
6969 return MapEntry (
7070 channel,
You can’t perform that action at this time.
0 commit comments