mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-27 12:26:31 +01:00
stub out support for dark theme by default
This commit is contained in:
parent
41a44548d2
commit
b6747a63ed
@ -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,9 +31,21 @@ namespace Bit.App.Utilities
|
||||
{
|
||||
Application.Current.Resources.MergedDictionaries.Add(new Nord());
|
||||
}
|
||||
else if(name == "light")
|
||||
{
|
||||
Application.Current.Resources.MergedDictionaries.Add(new Nord());
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Current.Resources.MergedDictionaries.Add(new Light());
|
||||
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
|
||||
|
@ -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 New Issue
Block a user