1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00
This commit is contained in:
Kyle Spearrin
2019-05-29 15:50:20 -04:00
parent 40484a7bf0
commit a1741fdd67
14 changed files with 265 additions and 139 deletions

View File

@@ -7,6 +7,7 @@ using Bit.Core.Enums;
using Bit.Core.Utilities;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Bit.App.Pages
{
@@ -17,6 +18,7 @@ namespace Bit.App.Pages
private readonly IStorageService _storageService;
private readonly ITotpService _totpService;
private readonly IStateService _stateService;
private readonly IMessagingService _messagingService;
private bool _disableFavicon;
private bool _disableAutoTotpCopy;
@@ -32,6 +34,7 @@ namespace Bit.App.Pages
_storageService = ServiceContainer.Resolve<IStorageService>("storageService");
_totpService = ServiceContainer.Resolve<ITotpService>("totpService");
_stateService = ServiceContainer.Resolve<IStateService>("stateService");
_messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService");
PageTitle = AppResources.Options;
@@ -172,7 +175,11 @@ namespace Bit.App.Pages
{
var theme = ThemeOptions[ThemeSelectedIndex].Key;
await _storageService.SaveAsync(Constants.ThemeKey, theme);
ThemeManager.SetThemeStyle(theme);
if(Device.RuntimePlatform == Device.Android)
{
await _deviceActionService.ShowLoadingAsync(AppResources.Saving);
}
_messagingService.Send("updatedTheme", theme);
}
}