Add loader for chat renaming
This commit is contained in:
parent
698890ae0f
commit
bd1f09c644
|
@ -8161,6 +8161,7 @@ jQuery(async function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
showLoader();
|
||||||
const response = await fetch('/api/chats/rename', {
|
const response = await fetch('/api/chats/rename', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify(body),
|
body: JSON.stringify(body),
|
||||||
|
@ -8195,6 +8196,8 @@ jQuery(async function () {
|
||||||
} catch {
|
} catch {
|
||||||
await delay(500);
|
await delay(500);
|
||||||
await callPopup('An error has occurred. Chat was not renamed.', 'text');
|
await callPopup('An error has occurred. Chat was not renamed.', 'text');
|
||||||
|
} finally {
|
||||||
|
hideLoader();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue