favorites: should post change events here
This commit is contained in:
@@ -175,19 +175,19 @@ export class MediaPlayer {
|
||||
}
|
||||
|
||||
public async addFavorite(filename: string) {
|
||||
return this.favoritesStore.addFavorite(filename);
|
||||
return this.modify(UserEvent.FavoritesUpdate, () => this.favoritesStore.addFavorite(filename));
|
||||
}
|
||||
|
||||
public async removeFavorite(filename: string) {
|
||||
return this.favoritesStore.removeFavorite(filename);
|
||||
return this.modify(UserEvent.FavoritesUpdate, () => this.favoritesStore.removeFavorite(filename));
|
||||
}
|
||||
|
||||
public async clearFavorites() {
|
||||
return this.favoritesStore.clearFavorites();
|
||||
return this.modify(UserEvent.FavoritesUpdate, () => this.favoritesStore.clearFavorites());
|
||||
}
|
||||
|
||||
public async updateFavoriteTitle(filename: string, title: string) {
|
||||
return this.favoritesStore.updateFavoriteTitle(filename, title);
|
||||
return this.modify(UserEvent.FavoritesUpdate, () => this.favoritesStore.updateFavoriteTitle(filename, title));
|
||||
}
|
||||
|
||||
private async loadFile(url: string, mode: string) {
|
||||
|
||||
Reference in New Issue
Block a user