refactor(Config): update workflow list with settled state management
Refactor the workflow list update logic in the Config page to handle the loading state more efficiently. Now, it waits for the workflow list update to complete before setting the settled state to true and updating the route to "chat". This sequence ensures that the loading indicator is not visible unnecessarily and improves the user experience.
This commit is contained in:
parent
de280846e5
commit
66972a90f7
@ -171,7 +171,11 @@ const Config = observer(() => {
|
||||
config.updateSettle(false);
|
||||
startLoading();
|
||||
// update workflow list
|
||||
config.updateWorkflowList();
|
||||
config.updateWorkflowList().then(() => {
|
||||
config.updateSettle(true);
|
||||
router.updateRoute("chat");
|
||||
closeLoading();
|
||||
});
|
||||
};
|
||||
|
||||
const changeModelDetail = (key: string, value: number | string) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user