Skip to content

Any tips on how to implement a "decrement" badge option? #4431

Closed
@SebC99

Description

@SebC99

I would like to do a PR to allow for a "decrement" badge option in push controller.
Adding a

if (typeof badge == 'string' && badge.toLowerCase() === 'decrement') {
  restUpdate = { badge: { __op: 'Increment', amount: -1 } }
}

is easy, by I guess we should take care of zero values, to avoid negative badge value.
Do you have any idea how I could implement this?
Or what would be the best way to have a decrement option in push controller?
(It would great to cancel a notification like an invite for example)

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions