mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 10:28:28 +03:00
stub out support for dark theme by default
This commit is contained in:
parent
41a44548d2
commit
b6747a63ed
4 changed files with 27 additions and 2 deletions
|
@ -612,6 +612,11 @@ namespace Bit.Droid.Services
|
|||
}
|
||||
}
|
||||
|
||||
public bool UsingDarkTheme()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool DeleteDir(Java.IO.File dir)
|
||||
{
|
||||
if(dir != null && dir.IsDirectory)
|
||||
|
|
|
@ -35,5 +35,6 @@ namespace Bit.App.Abstractions
|
|||
string GetBuildNumber();
|
||||
void OpenAccessibilitySettings();
|
||||
void OpenAutofillSettings();
|
||||
bool UsingDarkTheme();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using Bit.App.Services;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Services;
|
||||
using Bit.App.Styles;
|
||||
using Bit.Core;
|
||||
using Bit.Core.Utilities;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Utilities
|
||||
|
@ -29,10 +31,22 @@ namespace Bit.App.Utilities
|
|||
{
|
||||
Application.Current.Resources.MergedDictionaries.Add(new Nord());
|
||||
}
|
||||
else if(name == "light")
|
||||
{
|
||||
Application.Current.Resources.MergedDictionaries.Add(new Nord());
|
||||
}
|
||||
else
|
||||
{
|
||||
var deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService", true);
|
||||
if(deviceActionService?.UsingDarkTheme() ?? false)
|
||||
{
|
||||
Application.Current.Resources.MergedDictionaries.Add(new Dark());
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Current.Resources.MergedDictionaries.Add(new Light());
|
||||
}
|
||||
}
|
||||
|
||||
// Base styles
|
||||
Application.Current.Resources.MergedDictionaries.Add(new Base());
|
||||
|
|
|
@ -351,6 +351,11 @@ namespace Bit.iOS.Core.Services
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool UsingDarkTheme()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private void ImagePicker_FinishedPickingMedia(object sender, UIImagePickerMediaPickedEventArgs e)
|
||||
{
|
||||
if(sender is UIImagePickerController picker)
|
||||
|
|
Loading…
Reference in a new issue