mirror of
https://github.com/bitwarden/mobile
synced 2026-01-06 10:34:07 +00:00
This reverts commit 75ed72f91b.
This commit is contained in:
committed by
GitHub
parent
75ed72f91b
commit
7d42d19ae3
@@ -64,7 +64,6 @@ namespace Bit.Core.Services {
|
||||
var response = await _apiService.RenewFileUploadUrlAsync(uploadData.SendResponse.Id, uploadData.SendResponse.File.Id);
|
||||
return response.Url;
|
||||
};
|
||||
|
||||
await _azureFileUploadService.Upload(uploadData.Url, encryptedFileData, renewalCallback);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -219,12 +219,12 @@ namespace Bit.Core.Services
|
||||
{
|
||||
response = await LegacyServerSendFileUpload(request, send, encryptedFileData);
|
||||
}
|
||||
catch
|
||||
catch (Exception e)
|
||||
{
|
||||
if (response != default){
|
||||
await _apiService.DeleteSendAsync(response.Id);
|
||||
}
|
||||
throw;
|
||||
throw e;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
public class LazyResolve<T> : Lazy<T>
|
||||
{
|
||||
public LazyResolve(string containerKey)
|
||||
: base(() => ServiceContainer.Resolve<T>(containerKey))
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
public static class TaskExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Fires a task and ignores any exception.
|
||||
/// See http://stackoverflow.com/a/22864616/344182
|
||||
/// </summary>
|
||||
/// <param name="task">The task to be forgotten.</param>
|
||||
/// <param name="onException">Action to be called on exception.</param>
|
||||
public static async void FireAndForget(this Task task, Action<Exception> onException = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
await task.ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
onException?.Invoke(ex);
|
||||
// TODO: Add app center exception handling in here, but we have to check whether we can add the AppCenter package to Core
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user