Skip to content

Conditional inverted #530

@TofuBug

Description

@TofuBug

Describe the bug
in Source/Plugin.LocalNotification/Platforms/Android/ScheduledAlarmReceiver.cs

in the OnReceived method

The conditional to check if there was pending notifications after reboot (requestedList.Count) is inverted

currently it has

var requestList = NotificationRepository.Current.GetPendingList();
if (requestList.Count > 0)
{
    LocalNotificationCenter.Log("No Pending Notification Request");
    return;
}

it should be

var requestList = NotificationRepository.Current.GetPendingList();
if (requestList.Count <= 0)
{
    LocalNotificationCenter.Log("No Pending Notification Request");
    return;
}

To Reproduce
Steps to reproduce the behavior:

  1. Running with the current conditional never restores notifications after reboot

Expected behavior
Invert the conditional to what makes sense for the code block

Platform (please complete the following information):

  • OS: [Android]
  • Version [All i would assume]

Smartphone (please complete the following information):

  • Device: [Emulator]
  • OS: []
  • Version []

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions