1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-12 14:23:26 +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

@@ -15,6 +15,7 @@ using Bit.Droid.Receivers;
using Bit.App.Models;
using Bit.Core.Enums;
using Android.Nfc;
using Bit.App.Utilities;
namespace Bit.Droid
{
@@ -56,6 +57,7 @@ namespace Bit.Droid
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
UpdateTheme(ThemeManager.GetTheme());
base.OnCreate(savedInstanceState);
if(!CoreHelpers.InDebugMode())
{
@@ -95,6 +97,10 @@ namespace Bit.Droid
{
ListenYubiKey((bool)message.Data);
}
else if(message.Command == "updatedTheme")
{
Recreate();
}
});
}
@@ -255,5 +261,17 @@ namespace Bit.Droid
_messagingService.Send("gotYubiKeyOTP", otp);
}
}
private void UpdateTheme(string theme)
{
if(theme == "dark")
{
SetTheme(Resource.Style.DarkTheme);
}
else
{
SetTheme(Resource.Style.MainTheme);
}
}
}
}