Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Android: app freeze + fix #106

@softlion

Description

@softlion

Please replace this incorrect code which triggers app freeze when real async image sources are used (like SvgImageSource from https://github.com/softlion/XamSvg-Samples).

Replace in https://github.com/NAXAM/mapbox-xamarin-forms/blob/master/Naxam.Mapbox.Platform.Droid/Extensions/ImageSourceExtensions.cs

            return handler?
                .LoadImageAsync(source, context).Result;

With this correct code:

            return handler?
                .LoadImageAsync(source, context).GetAwaiter().GetResult();

Or better: make this method async.

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