Update
This commit is contained in:
@@ -30,7 +30,7 @@ const EditorControls = ({ className = '', onEditClick = () => {}, isEditActive =
|
||||
|
||||
const handleRefresh = () => {
|
||||
handleReset();
|
||||
init();
|
||||
init(true);
|
||||
};
|
||||
|
||||
const togglePlayPause = () => {
|
||||
|
||||
@@ -133,7 +133,7 @@ const useMediaStore = create(
|
||||
set({ keywords: [] });
|
||||
},
|
||||
|
||||
init: async () => {
|
||||
init: async (skipCache = false) => {
|
||||
const state = get();
|
||||
|
||||
// Skip API call completely if ALL initial values were set via props
|
||||
@@ -142,7 +142,12 @@ const useMediaStore = create(
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await axiosInstance.post(route('api.app.init'));
|
||||
const params = {};
|
||||
if (skipCache) {
|
||||
params.sc = '1';
|
||||
}
|
||||
|
||||
const response = await axiosInstance.post(route('api.app.init'), params);
|
||||
|
||||
if (response?.data?.success?.data?.init) {
|
||||
const updates = {};
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user