Add confirmation popup before unsubscribing

This commit is contained in:
msagr 2024-04-08 01:11:52 +05:30
parent 8b16bd5d6d
commit 833355bbbd
1 changed files with 4 additions and 0 deletions

View File

@ -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
})