diff --git a/src/App/Pages/Send/SendAddEditPageViewModel.cs b/src/App/Pages/Send/SendAddEditPageViewModel.cs index 5faf0aab3..2bf80cbde 100644 --- a/src/App/Pages/Send/SendAddEditPageViewModel.cs +++ b/src/App/Pages/Send/SendAddEditPageViewModel.cs @@ -18,6 +18,7 @@ namespace Bit.App.Pages { private readonly IDeviceActionService _deviceActionService; private readonly IPlatformUtilsService _platformUtilsService; + private readonly IMessagingService _messagingService; private readonly IUserService _userService; private readonly ISendService _sendService; private bool _sendEnabled; @@ -44,6 +45,7 @@ namespace Bit.App.Pages { _deviceActionService = ServiceContainer.Resolve("deviceActionService"); _platformUtilsService = ServiceContainer.Resolve("platformUtilsService"); + _messagingService = ServiceContainer.Resolve("messagingService"); _userService = ServiceContainer.Resolve("userService"); _sendService = ServiceContainer.Resolve("sendService"); TogglePasswordCommand = new Command(TogglePassword); @@ -350,6 +352,14 @@ namespace Bit.App.Pages EditMode ? AppResources.SendUpdated : AppResources.NewSendCreated); await Page.Navigation.PopModalAsync(); + if (Device.RuntimePlatform == Device.Android && IsFile) + { + // Workaround for https://github.com/xamarin/Xamarin.Forms/issues/5418 + // Exiting and returning (file picker) calls OnAppearing on list page instead of this modal, and + // it doesn't get called again when the model is dismissed, so the list isn't updated. + _messagingService.Send("sendUpdated"); + } + if (ShareOnSave) { var savedSend = await _sendService.GetAsync(sendId); diff --git a/src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml.cs b/src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml.cs index 5d93528c2..8d9d012a2 100644 --- a/src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml.cs +++ b/src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml.cs @@ -70,7 +70,7 @@ namespace Bit.App.Pages { Device.BeginInvokeOnMainThread(() => IsBusy = true); } - else if (message.Command == "syncCompleted") + else if (message.Command == "syncCompleted" || message.Command == "sendUpdated") { await Task.Delay(500); Device.BeginInvokeOnMainThread(() =>