Add cooldown to upload modal publish button

This commit is contained in:
thePR0M3TH3AN committed 2025-10-20 12:59:16 -04:00
1 parent 2474d8b9cf
commit 189ea22fb9
2 files changed
+108 -1

No files matched your search

+7 -1
View File
@@ -2777,7 +2777,7 @@ class Application {
const payload = event?.detail?.payload || {};
try {
await this.authService.handleUploadSubmit(payload, {
const publishResult = await this.authService.handleUploadSubmit(payload, {
publish: (data) =>
this.publishVideoNote(data, {
onSuccess: () => {
@@ -2787,7 +2787,13 @@ class Application {
},
}),
});
if (!publishResult && this.uploadModal?.cancelCustomSubmitCooldown) {
this.uploadModal.cancelCustomSubmitCooldown();
}
} catch (error) {
if (this.uploadModal?.cancelCustomSubmitCooldown) {
this.uploadModal.cancelCustomSubmitCooldown();
}
const message =
error && typeof error.message === "string" && error.message.trim()
? error.message.trim()