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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user