fix(ags players): make favorite player be first on startup
This commit is contained in:
parent
fc13e694fb
commit
68962df0b8
2 changed files with 4 additions and 5 deletions
|
@ -90,6 +90,7 @@
|
||||||
]) ++
|
]) ++
|
||||||
|
|
||||||
(with pkgs; [
|
(with pkgs; [
|
||||||
|
comma
|
||||||
dracula-theme
|
dracula-theme
|
||||||
neofetch
|
neofetch
|
||||||
progress
|
progress
|
||||||
|
|
|
@ -130,13 +130,11 @@ export default () => Box({
|
||||||
overlay.overlays = result;
|
overlay.overlays = result;
|
||||||
|
|
||||||
// Select favorite player at startup
|
// Select favorite player at startup
|
||||||
if (!overlay._setup) {
|
if (!overlay._setup && overlay._players.has(FAVE_PLAYER)) {
|
||||||
if (overlay._players.has(FAVE_PLAYER))
|
overlay.reorder_overlay(overlay._players.get(FAVE_PLAYER), -1);
|
||||||
overlay.reorder_overlay(overlay._players.get(FAVE_PLAYER), -1);
|
|
||||||
|
|
||||||
overlay._setup = true;
|
overlay._setup = true;
|
||||||
}
|
}
|
||||||
else {
|
else if (overlay._players.get(previousFirst)) {
|
||||||
overlay.reorder_overlay(overlay._players.get(previousFirst), -1);
|
overlay.reorder_overlay(overlay._players.get(previousFirst), -1);
|
||||||
}
|
}
|
||||||
}, 'player-added'],
|
}, 'player-added'],
|
||||||
|
|
Loading…
Reference in a new issue