fix: import the bookmarked status to the start of the cache array
This commit is contained in:
parent
e3aff3bdc6
commit
beed9fa6c3
|
@ -61,7 +61,7 @@ function useBookmark() {
|
||||||
const response = await api.post(`/api/v1/statuses/${statusId}/bookmark`);
|
const response = await api.post(`/api/v1/statuses/${statusId}/bookmark`);
|
||||||
const result = statusSchema.safeParse(await response.json());
|
const result = statusSchema.safeParse(await response.json());
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
dispatch(importEntities([result.data], Entities.STATUSES, 'bookmarks'));
|
dispatch(importEntities([result.data], Entities.STATUSES, 'bookmarks', 'start'));
|
||||||
}
|
}
|
||||||
return { success: true };
|
return { success: true };
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue