1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-06 10:34:07 +00:00
This commit is contained in:
Kyle Spearrin
2019-05-15 13:09:49 -04:00
parent 2c302985f8
commit 264028b623
5 changed files with 73 additions and 1 deletions

View File

@@ -16,5 +16,6 @@ namespace Bit.App.Abstractions
Task SelectFileAsync();
Task<string> DisplayPromptAync(string title = null, string description = null, string text = null,
string okButtonText = null, string cancelButtonText = null);
void RateApp();
}
}

View File

@@ -52,6 +52,10 @@ namespace Bit.App.Pages
{
await _vm.FingerprintAsync();
}
else if(item.Name == AppResources.RateTheApp)
{
_vm.Rate();
}
}
}
}

View File

@@ -1,4 +1,5 @@
using Bit.App.Resources;
using Bit.App.Abstractions;
using Bit.App.Resources;
using Bit.Core.Abstractions;
using Bit.Core.Utilities;
using System;
@@ -13,12 +14,14 @@ namespace Bit.App.Pages
private readonly IPlatformUtilsService _platformUtilsService;
private readonly ICryptoService _cryptoService;
private readonly IUserService _userService;
private readonly IDeviceActionService _deviceActionService;
public SettingsPageViewModel()
{
_platformUtilsService = ServiceContainer.Resolve<IPlatformUtilsService>("platformUtilsService");
_cryptoService = ServiceContainer.Resolve<ICryptoService>("cryptoService");
_userService = ServiceContainer.Resolve<IUserService>("userService");
_deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
PageTitle = AppResources.Settings;
BuildList();
@@ -57,6 +60,11 @@ namespace Bit.App.Pages
}
}
public void Rate()
{
_deviceActionService.RateApp();
}
private void BuildList()
{
var doUpper = Device.RuntimePlatform != Device.Android;