mirror of
https://github.com/bitwarden/mobile
synced 2025-12-11 22:03:27 +00:00
[EC-259] Added Account Switching to Share extension on iOS (#1971)
* EC-259 Added Account switching on share extension on iOS, also improved performance for this and exception handling * EC-259 code formatting * EC-259 Added account switching to Share extension Send view * EC-259 Fixed navigation on share extension when a forms page is already presented * EC-259 Fix send text UI update when going from the iOS extension * EC-259 Improved DateTimeViewModel with helper property to easily setup date and time at the same time and applied on usage
This commit is contained in:
committed by
GitHub
parent
d621a5d2f3
commit
292908f53f
@@ -7,7 +7,11 @@ namespace Bit.iOS.Core.Controllers
|
||||
public class ExtendedUIViewController : UIViewController
|
||||
{
|
||||
public Action DismissModalAction { get; set; }
|
||||
|
||||
|
||||
public ExtendedUIViewController()
|
||||
{
|
||||
}
|
||||
|
||||
public ExtendedUIViewController(IntPtr handle)
|
||||
: base(handle)
|
||||
{
|
||||
@@ -28,16 +32,28 @@ namespace Bit.iOS.Core.Controllers
|
||||
{
|
||||
View.BackgroundColor = ThemeHelpers.BackgroundColor;
|
||||
}
|
||||
if (NavigationController?.NavigationBar != null)
|
||||
UpdateNavigationBarTheme();
|
||||
}
|
||||
|
||||
protected virtual void UpdateNavigationBarTheme()
|
||||
{
|
||||
UpdateNavigationBarTheme(NavigationController?.NavigationBar);
|
||||
}
|
||||
|
||||
protected void UpdateNavigationBarTheme(UINavigationBar navBar)
|
||||
{
|
||||
if (navBar is null)
|
||||
{
|
||||
NavigationController.NavigationBar.BarTintColor = ThemeHelpers.NavBarBackgroundColor;
|
||||
NavigationController.NavigationBar.BackgroundColor = ThemeHelpers.NavBarBackgroundColor;
|
||||
NavigationController.NavigationBar.TintColor = ThemeHelpers.NavBarTextColor;
|
||||
NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes
|
||||
{
|
||||
ForegroundColor = ThemeHelpers.NavBarTextColor
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
navBar.BarTintColor = ThemeHelpers.NavBarBackgroundColor;
|
||||
navBar.BackgroundColor = ThemeHelpers.NavBarBackgroundColor;
|
||||
navBar.TintColor = ThemeHelpers.NavBarTextColor;
|
||||
navBar.TitleTextAttributes = new UIStringAttributes
|
||||
{
|
||||
ForegroundColor = ThemeHelpers.NavBarTextColor
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user