private async void OnShellDialogMessageReceived(ShellDialogResponseMessage message)
{
if (!message.IsItForMe(this.correlationId)) return;
try
{
if (message.Response == ShellDialogButton.Cancel) return;
var changed = AccessKeyId != this.widget.LedgerBook.MobileSettings.AccessKeyId;
changed |= AccessKeySecret != this.widget.LedgerBook.MobileSettings.AccessKeySecret;
changed |= AmazonRegion != this.widget.LedgerBook.MobileSettings.AmazonS3Region;
if (changed)
{
this.widget.LedgerBook.MobileSettings.AccessKeyId = AccessKeyId;
this.widget.LedgerBook.MobileSettings.AccessKeySecret = AccessKeySecret;
this.widget.LedgerBook.MobileSettings.AmazonS3Region = AmazonRegion;
this.appDbService.NotifyOfChange(ApplicationDataType.Ledger);
}
await AttemptUploadAsync();
}
finally
{
this.widget = null;
}
}