forked from Boria138/PortProtonQt
fix(main_window): remove redundant loading status and improve loading flow
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@@ -780,11 +780,10 @@ class MainWindow(QMainWindow):
|
|||||||
self.pending_games = []
|
self.pending_games = []
|
||||||
self.games = []
|
self.games = []
|
||||||
|
|
||||||
# Show initial progress bar and status message immediately
|
# Show initial progress bar immediately
|
||||||
self.progress_bar.setRange(0, 100) # Set to determinate range
|
self.progress_bar.setRange(0, 100) # Set to determinate range
|
||||||
self.progress_bar.setValue(0)
|
self.progress_bar.setValue(0)
|
||||||
self.progress_bar.setVisible(True)
|
self.progress_bar.setVisible(True)
|
||||||
self.update_status_message.emit(_("Loading games..."), 0)
|
|
||||||
|
|
||||||
# Process events to keep UI responsive
|
# Process events to keep UI responsive
|
||||||
QApplication.processEvents()
|
QApplication.processEvents()
|
||||||
@@ -899,8 +898,8 @@ class MainWindow(QMainWindow):
|
|||||||
self.update_status_message.emit
|
self.update_status_message.emit
|
||||||
)
|
)
|
||||||
|
|
||||||
# Run loading with minimal delay to allow UI to be responsive
|
# Run loading immediately to show status without delay
|
||||||
QTimer.singleShot(100, start_loading) # Reduced to 100ms
|
start_loading()
|
||||||
|
|
||||||
def _load_steam_games_async(self, callback: Callable[[list[tuple]], None]):
|
def _load_steam_games_async(self, callback: Callable[[list[tuple]], None]):
|
||||||
steam_games = []
|
steam_games = []
|
||||||
|
|||||||
Reference in New Issue
Block a user