Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Shell Navigation Animation #13621

Closed
angelru opened this issue Feb 2, 2021 · 2 comments
Closed

[Bug] Shell Navigation Animation #13621

angelru opened this issue Feb 2, 2021 · 2 comments
Labels
a/navigation a/shell 🐚 s/unverified New report that has yet to be verified t/bug 🐛

Comments

@angelru
Copy link

angelru commented Feb 2, 2021

When I navigate to another page and load content from my api, the ActivityIndicator flickers or the interface is blocked and produces that feeling of flickering and has to do with the animation because it hasn't finished yet navigation, if I set the animation to false everything works fine. There should be an event apart from OnAppearing or OnDisappearing in shell or ContentPage to determine when the navigation has finished and there execute our API call methods.

Example:

   var vm = new ChatMessagesPageViewModel
            {
                ChatRoom = _selectedChat
            };

            var page = new ChatMessagesPage
            {
                BindingContext = vm
            };

            await Shell.Current.Navigation.PushAsync(page);

  public ChatRoom ChatRoom
        {
            get => _chatRoom;
            set
            {
                _chatRoom = value;
                 ChatMessagesLoader.Load(InitMessagesAsync);
            }
        }

 public async Task InitMessagesAsync()
        {
            if (!_chatRoom.IsPrivate)
            {
                var cleanIds = _chatRoom.UserIds.Except(users.Keys);

                if (cleanIds.Any())
                {
                    await Task.WhenAll(cleanIds.Select(async id =>
                    {
                        var user = await ApiRest.UserAsync(id);
                        users.Add(id, user.Name);
                    }));
                }
            }

            var employes =  await ApiRest.ChatMessagesAsync();
}
@angelru angelru added s/unverified New report that has yet to be verified t/bug 🐛 labels Feb 2, 2021
@angelru
Copy link
Author

angelru commented Feb 4, 2021

Screenrecorder-2021-02-04-10-28-14-28

@rachelkang
Copy link
Contributor

Hi, @angelru - thank you for sharing! We definitely agree that's an awesome idea, and we're excited to introduce these capabilities in .NET MAUI - please feel free to check out and follow the discussion on our current spec for lifecycle events and share your thoughts with us! We'd love to hear them :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/navigation a/shell 🐚 s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

3 participants