fix(weChat): 移除消息加载状态的延迟设置

移除setTimeout延迟设置messagesLoading为false的逻辑,改为在try和finally块中直接设置,避免不必要的延迟
This commit is contained in:
超级老白兔
2025-09-08 10:32:00 +08:00
parent b84a3255c6
commit 1305bfac59

View File

@@ -91,12 +91,11 @@ export const useWeChatStore = create<WeChatState>()(
});
}
}
set({ messagesLoading: false });
} catch (error) {
console.error("获取聊天消息失败:", error);
} finally {
setTimeout(() => {
set({ messagesLoading: false });
}, 1500);
set({ messagesLoading: false });
}
},