1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-08 03:23:23 +00:00

api error detection updates

This commit is contained in:
Kyle Spearrin
2019-04-19 09:11:17 -04:00
parent 0c93fc2662
commit 8c8fa8ae4c
6 changed files with 52 additions and 8 deletions

View File

@@ -1,9 +1,11 @@
using System.Threading.Tasks;
using Bit.Core.Enums;
using System.Threading.Tasks;
namespace Bit.App.Abstractions
{
public interface IDeviceActionService
{
DeviceType DeviceType { get; }
void Toast(string text, bool longDuration = false);
bool LaunchApp(string appName);
Task ShowLoadingAsync(string text);

View File

@@ -64,7 +64,7 @@ namespace Bit.App.Services
public Core.Enums.DeviceType GetDevice()
{
return Device.RuntimePlatform == Device.iOS ? Core.Enums.DeviceType.iOS : Core.Enums.DeviceType.Android;
return _deviceActionService.DeviceType;
}
public string GetDeviceString()
@@ -91,7 +91,7 @@ namespace Bit.App.Services
else
{
var launched = false;
if(Device.RuntimePlatform == Device.Android && uri.StartsWith("androidapp://"))
if(GetDevice() == Core.Enums.DeviceType.Android && uri.StartsWith("androidapp://"))
{
launched = _deviceActionService.LaunchApp(uri);
}