fix(ags players): make favorite player be first on startup

This commit is contained in:
matt1432 2023-11-01 23:11:39 -04:00
parent fc13e694fb
commit 68962df0b8
2 changed files with 4 additions and 5 deletions

View file

@ -90,6 +90,7 @@
]) ++
(with pkgs; [
comma
dracula-theme
neofetch
progress

View file

@ -130,13 +130,11 @@ export default () => Box({
overlay.overlays = result;
// Select favorite player at startup
if (!overlay._setup) {
if (overlay._players.has(FAVE_PLAYER))
overlay.reorder_overlay(overlay._players.get(FAVE_PLAYER), -1);
if (!overlay._setup && overlay._players.has(FAVE_PLAYER)) {
overlay.reorder_overlay(overlay._players.get(FAVE_PLAYER), -1);
overlay._setup = true;
}
else {
else if (overlay._players.get(previousFirst)) {
overlay.reorder_overlay(overlay._players.get(previousFirst), -1);
}
}, 'player-added'],