Add loader for chat renaming

This commit is contained in:
Cohee 2023-12-07 12:27:18 +02:00
parent 698890ae0f
commit bd1f09c644
1 changed files with 3 additions and 0 deletions

View File

@ -8161,6 +8161,7 @@ jQuery(async function () {
};
try {
showLoader();
const response = await fetch('/api/chats/rename', {
method: 'POST',
body: JSON.stringify(body),
@ -8195,6 +8196,8 @@ jQuery(async function () {
} catch {
await delay(500);
await callPopup('An error has occurred. Chat was not renamed.', 'text');
} finally {
hideLoader();
}
});