1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-08 19:43:56 +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);
}
}

View File

@@ -32,6 +32,10 @@ namespace Bit.App.Pages
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.ToolbarPlacement.Bottom);
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetIsSwipePagingEnabled(this, false);
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetIsSmoothScrollEnabled(this, false);
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetBarSelectedItemColor(this,
(Color)Application.Current.Resources["TabBarSelectedItemColor"]);
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetBarItemColor(this,
(Color)Application.Current.Resources["TabBarItemColor"]);
}
protected async override void OnCurrentPageChanged()

View File

@@ -349,7 +349,7 @@ namespace Bit.App.Pages
col.Checked = CollectionIds.Contains(col.Collection.Id);
}
}
if(Cipher.Login.Uris != null)
if(Cipher.Login?.Uris != null)
{
Uris.ResetWithRange(Cipher.Login.Uris);
}