start the websocket after we confirm there are drops to mine
This commit is contained in:
1 parent
0b3a11ac1a
commit
ec4e652ab3
1 file changed
+2
-1
@@ -160,7 +160,6 @@ class Twitch:
|
|||||||
WebsocketTopic("User", "Drops", self._user_id, self.process_drops),
|
WebsocketTopic("User", "Drops", self._user_id, self.process_drops),
|
||||||
WebsocketTopic("User", "CommunityPoints", self._user_id, self.process_points),
|
WebsocketTopic("User", "CommunityPoints", self._user_id, self.process_points),
|
||||||
])
|
])
|
||||||
await self.websocket.start()
|
|
||||||
games: Set[Game] = set()
|
games: Set[Game] = set()
|
||||||
selected_game: Optional[Game] = None
|
selected_game: Optional[Game] = None
|
||||||
self.change_state(State.INVENTORY_FETCH)
|
self.change_state(State.INVENTORY_FETCH)
|
||||||
@@ -185,6 +184,8 @@ class Twitch:
|
|||||||
if not games:
|
if not games:
|
||||||
self.gui.print("No active campaigns to farm drops for.")
|
self.gui.print("No active campaigns to farm drops for.")
|
||||||
return
|
return
|
||||||
|
# only start the websocket after we confirm there are drops to mine
|
||||||
|
await self.websocket.start()
|
||||||
self.gui.games.set_games(games)
|
self.gui.games.set_games(games)
|
||||||
selected_game = self.gui.games.get_selection()
|
selected_game = self.gui.games.get_selection()
|
||||||
self.change_state(State.CHANNEL_FETCH)
|
self.change_state(State.CHANNEL_FETCH)
|
||||||
|
|||||||
Reference in new issue
Block a user