@@ -67,6 +67,7 @@ def init_ui(self):
6767 self .token_entry .setEchoMode (QLineEdit .Password )
6868 self .token_entry .setFixedHeight (28 )
6969 self .token_entry .textChanged .connect (self .handle_token_change )
70+ self .token_entry .returnPressed .connect (self .refresh_account_info )
7071 token_entry_row .addWidget (self .token_entry )
7172
7273 # Eye icon for password visibility
@@ -139,6 +140,13 @@ def init_ui(self):
139140 live_row .addWidget (live_label )
140141 live_row .addWidget (self .can_go_live )
141142 token_layout .addLayout (live_row )
143+
144+ # Refresh account info button
145+ refresh_btn = QPushButton ("Refresh Account Info" )
146+ refresh_btn .setFixedHeight (30 )
147+ refresh_btn .setToolTip ("Refresh account information" )
148+ refresh_btn .clicked .connect (self .refresh_account_info )
149+ token_layout .addWidget (refresh_btn )
142150
143151 # Add stretch to prevent expansion
144152 token_layout .addStretch ()
@@ -290,11 +298,7 @@ def load_config(self):
290298 self .mature_checkbox .setChecked (data .get ("audience_type" , "0" ) == "1" )
291299 self .suppress_donation_reminder = data .get ("suppress_donation_reminder" , False )
292300
293- if self .token_entry .text ():
294- self .stream = Stream (self .token_entry .text ())
295- self .load_account_info ()
296- self .fetch_game_mask_id (self .game_category .text ())
297- self .save_config (False )
301+ self .refresh_account_info ()
298302
299303 def save_config (self , show_message = True ):
300304 data = {
@@ -334,6 +338,13 @@ def load_account_info(self):
334338
335339 except Exception as e :
336340 QMessageBox .critical (self , "Error" , f"Failed to load account info: { str (e )} " )
341+
342+ def refresh_account_info (self ):
343+ if self .token_entry .text ():
344+ self .stream = Stream (self .token_entry .text ())
345+ self .load_account_info ()
346+ self .fetch_game_mask_id (self .game_category .text ())
347+ self .save_config (False )
337348
338349 def load_local_token (self ):
339350 # Determine the correct path based on the operating system
0 commit comments