xabre / xamarin-forms-tab-badge

Xamarin Forms bindable Tab badges for iOS, Android, UWP, MacOS and WPF
MIT License
307 stars 75 forks source link

Plugin.Badge is not working with FFImageLoading or Xamarin.Forms.Nuke on iOS #99

Open acuntex opened 4 years ago

acuntex commented 4 years ago

🐛 Bug Report

When using Plugin.Badge in combination with FFImageLoading (and the method CachedImageRenderer.InitImageSourceHandler()) or Xamarin.Forms.Nuke (and the method Xamarin.Forms.Nuke.FormsHandler.Init()), the Badges are not shown. Only after changing the values of the badges, they are shown.

Since it is necessary to use either FFImageLoading or Xamarin.Forms.Nuke in any app that's getting slightly bigger and that's using images, compatibility is necessary.

Expected behavior

Plugin.Badge works together with FFImageLoading and Xamarin.Forms.Nuke.

Reproduction steps

  1. Install Plugin.Badge
  2. Install FFImageLoading or Xamarin.Forms.Nuke
  3. Call CachedImageRenderer.InitImageSourceHandler() or Xamarin.Forms.Nuke.FormsHandler.Init()
  4. Try to use Badges

See repro for FFImageloading: https://github.com/acuntex/PluginBadge_Bug See repro for Xamarin.Forms.Nuke: https://github.com/acuntex/NukePluginBadge_Bug

Configuration

Version: 2.3.0

Platform:

michelmoorlag commented 2 years ago

As for FFImageLoading, don't call CachedImageRenderer.InitImageSourceHandler(); in your AppDeletegate.cs. But keep in mind that you can not use FFimageloading with Xamarin.Forms.Image (any more). In my case I was not using that anyway.