feat(quick-7): wire frontend pin-default-playlist feature end-to-end
- Add pinDefault state, getter, setter to favorites-store - Add pinDefault getter and setPinDefault to favorites-controller - Update sortedEntries in playlist-view to pin default playlist to top - Add Pin to Top toggle in config page Favorites section - Add Wails bindings for GetPinDefaultPlaylist/SetPinDefaultPlaylist - React to PinDefault in FavoritesConfigChanged event payload
This commit is contained in:
@@ -69,6 +69,10 @@ export class FavoritesController
|
||||
return favoritesStore.getPlaylistId();
|
||||
}
|
||||
|
||||
get pinDefault(): boolean {
|
||||
return favoritesStore.getPinDefault();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the icon name for the current icon style.
|
||||
*/
|
||||
@@ -113,4 +117,10 @@ export class FavoritesController
|
||||
): Promise<void> {
|
||||
await favoritesStore.setDefaultPlaylist(id);
|
||||
}
|
||||
|
||||
async setPinDefault(
|
||||
pin: boolean,
|
||||
): Promise<void> {
|
||||
await favoritesStore.setPinDefault(pin);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user