mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
update album play count
This commit is contained in:
parent
f82889e5ec
commit
96b4f8dd89
3 changed files with 39 additions and 6 deletions
|
|
@ -27,7 +27,7 @@ export interface EventState {
|
|||
export interface EventSlice extends EventState {
|
||||
actions: {
|
||||
favorite: (ids: string[], favorite: boolean) => void;
|
||||
play: (ids: string[]) => void;
|
||||
play: (id: string) => void;
|
||||
rate: (ids: string[], rating: number | null) => void;
|
||||
};
|
||||
}
|
||||
|
|
@ -43,10 +43,10 @@ export const useEventStore = create<EventSlice>()(
|
|||
state.ids = ids;
|
||||
});
|
||||
},
|
||||
play(ids) {
|
||||
play(id) {
|
||||
set((state) => {
|
||||
state.event = { event: 'play', timestamp: new Date().toISOString() };
|
||||
state.ids = ids;
|
||||
state.ids = [id];
|
||||
});
|
||||
},
|
||||
rate(ids, rating) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue