ionic-team / capacitor-plugins

Official plugins for Capacitor ⚡️
518 stars 583 forks source link

LocalNotifications: deleteChannel interface requires unnecessary fields #453

Closed mlynch closed 2 years ago

mlynch commented 3 years ago

Bug Report

Plugin(s)

Local Notifications

Capacitor Version

3.0.0

Platform(s)

Android

Current Behavior

LocalNotifications.deleteChannel uses the same type from createChannel which requires id, name and importance though only the id field is required for deleteChannel to operate.

Expected Behavior

deleteChannel uses a subset of the createChannel types, namely just the id field

jcesarmobile commented 3 years ago

Yeah, despite only the id is used, you'll usually get the channel list first with listChannels() as you won't have them "in memory", so it's easier to pass a channel you got from there than getting the list first and then the id.

But we can change it in a future release if you want, but since it would be a breaking change, I've added to the 2.0.0 milestone. Should also be done for the push-notifications plugin as it also have the deleteChannel function

jcesarmobile commented 2 years ago

this has been fixed on 4.0.0 beta 0

ionitron-bot[bot] commented 2 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.