mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
feat(PaintingsStore): Modify painting addition order
Change addPainting method to use unshift instead of push, ensuring new paintings are added to the beginning of the list
This commit is contained in:
parent
2cf842bc4f
commit
c95da64fee
@ -33,7 +33,7 @@ const paintingsSlice = createSlice({
|
||||
state.paintings = action.payload
|
||||
},
|
||||
addPainting: (state, action: PayloadAction<Painting>) => {
|
||||
state.paintings.push(action.payload)
|
||||
state.paintings.unshift(action.payload)
|
||||
},
|
||||
removePainting: (state, action: PayloadAction<Painting>) => {
|
||||
if (state.paintings.length === 1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user