Display error when chat info couldn't be loaded

This commit is contained in:
Cohee 2023-11-04 18:49:06 +02:00
parent 9181747939
commit 81e52fb77c
2 changed files with 9 additions and 6 deletions

View File

@ -5450,6 +5450,12 @@ export async function displayPastChats() {
const group = selected_group ? groups.find(x => x.id === selected_group) : null;
const data = await (selected_group ? getGroupPastChats(selected_group) : getPastCharacterChats());
if (!data) {
toastr.error('Could not load chat data. Try reloading the page.');
return;
}
const currentChat = selected_group ? group?.chat_id : characters[this_chid]["chat"];
const displayName = selected_group ? group?.name : characters[this_chid].name;
const avatarImg = selected_group ? group?.avatar_url : getThumbnailUrl('avatar', characters[this_chid]['avatar']);

View File

@ -2698,12 +2698,9 @@ h5 {
margin: 0;
}
/* .select_chat_block_wrapper {
display: grid;
grid-template-columns: auto min-content;
align-items: center;
grid-gap: 10px;
} */
.select_chat_block_wrapper {
cursor: pointer;
}
.select_chat_block {
border-radius: 5px;