refactor: replace isLoading with isSuccess
This commit is contained in:
@@ -23,7 +23,7 @@ export const onMessageSendStarted = async (
|
||||
if (type == "archive") return;
|
||||
// id: who send to ,from_uid: who sent
|
||||
// console.log("handlers data", content, type, properties, ignoreLocal, id);
|
||||
const isMedia = ["image", "video", "audio"].includes(properties.content_type.split('/')[0]);
|
||||
const isMedia = properties.content_type ? ["image", "video", "audio"].includes(properties.content_type.split('/')[0]) : false;
|
||||
// const isImage = properties.content_type?.startsWith("image");
|
||||
const ts = properties.local_id || +new Date();
|
||||
const tmpMsg = {
|
||||
|
||||
@@ -28,11 +28,9 @@ export const userApi = createApi({
|
||||
});
|
||||
},
|
||||
async onQueryStarted(data, { dispatch, queryFulfilled }) {
|
||||
// const local_uid = Number(localStorage.getItem(KEY_UID));
|
||||
try {
|
||||
const { data: users } = await queryFulfilled;
|
||||
dispatch(fillUsers(users));
|
||||
// }
|
||||
} catch {
|
||||
console.log("get user list error");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user