New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BadgeCounter #807 #1126
BadgeCounter #807 #1126
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Vlad!
Let's avoid adding a NuGet Dependency to CommunityToolkti.Maui.Core
. Let's see if we can instead leverage that author's implementation.
I'd also like to rename the namespace to CommunityToolkit.Maui.ApplicationModel
to align with .NET MAUI and rename the class to Badge
so that we could add additional methods in the future (eg Clear()
).
src/CommunityToolkit.Maui.Core/Essentials/BadgeCounter/IBadgeCounter.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/BadgeCounter/IBadgeCounter.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/BadgeCounter/BadgeCounterImplementation.android.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/BadgeCounter/BadgeCounterImplementation.android.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/BadgeCounter/BadgeCounter.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/BadgeCounter/BadgeCounterImplementation.net.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/BadgeCounter/BadgeCounterImplementation.macios.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/BadgeCounter/BadgeCounterImplementation.android.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/CommunityToolkit.Maui.Core.csproj
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/BadgeCounter/BadgeCounter.shared.cs
Outdated
Show resolved
Hide resolved
bae5569
to
a942925
Compare
samples/CommunityToolkit.Maui.Sample/Platforms/Android/MainApplication.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/Platforms/Android/SamsungBadgeProvider.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/Platforms/Android/SamsungBadgeProvider.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/Badge/Android/BadgeFactory.android.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/Badge/Android/BadgeFactory.android.cs
Outdated
Show resolved
Hide resolved
2eff998
to
cd36f81
Compare
- Fix a typo in SamsungBadgeProvider.cs by changing "new[1]" to "new string[1]" - Add a new test method GetBadgeFailsOnNet() in BadgeTests.cs that tests the behavior of getting badge count on .NET platform - Modify the existing test method SetBadgeFailsOnNet() in BadgeTests.cs to throw NotSupportedException instead of NotImplementedException - Add a new method GetCount() in BadgeImplementationMock.cs that throws NotImplementedException
Sorry Vlad - this was my fault!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Vlad! It looks like we have a bug in Windows' GetCount()
implementation; it always returns 0
src/CommunityToolkit.Maui.Core/Essentials/Badge/BadgeImplementation.windows.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/Badge/IBadge.shared.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/Badge/BadgeImplementation.macios.cs
Outdated
Show resolved
Hide resolved
801f8f0
to
82b07d7
Compare
src/CommunityToolkit.Maui.Core/Essentials/Badge/Android/BadgeFactory.android.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/Badge/Android/DefaultBadgeProvider.android.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/Badge/BadgeImplementation.tizen.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/Badge/BadgeImplementation.windows.cs
Outdated
Show resolved
Hide resolved
…ation.windows.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
…ation.tizen.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
…actory.android.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
…tBadgeProvider.android.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, Vlad!!
Description of Change
Adds Badge Counter
Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information