From 833355bbbd4f0cb57139f20ef02a45729c0f9c8b Mon Sep 17 00:00:00 2001 From: msagr Date: Mon, 8 Apr 2024 01:11:52 +0530 Subject: [PATCH] Add confirmation popup before unsubscribing --- .../components/ft-subscribe-button/ft-subscribe-button.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer/components/ft-subscribe-button/ft-subscribe-button.js b/src/renderer/components/ft-subscribe-button/ft-subscribe-button.js index 806310857..067be3ed2 100644 --- a/src/renderer/components/ft-subscribe-button/ft-subscribe-button.js +++ b/src/renderer/components/ft-subscribe-button/ft-subscribe-button.js @@ -105,6 +105,10 @@ export default defineComponent({ const currentProfile = deepCopy(profile) if (this.isProfileSubscribed(profile)) { + // confirmation pop-up + if (!confirm('Are you sure you want to unsubscribe?')) { + return + } currentProfile.subscriptions = currentProfile.subscriptions.filter((channel) => { return channel.id !== this.channelId })