mirror of
https://github.com/bitwarden/mobile
synced 2026-01-08 03:23:23 +00:00
PM-3349 Added Handler that enables the ExtendedDatePicker to get IsFocused events in Android. This is a workaround for fixing the current bug where it's not possible to select the "current day" in the expiration date of a Send.
Fix for TimePicker not displaying default Time Value Updated some "Device" code to the new MAUI "DeviceInfo"
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:controls="clr-namespace:Bit.App.Controls"
|
||||
x:Class="Bit.App.Controls.DateTimePicker"
|
||||
Unloaded="DateTimePicker_OnUnloaded"
|
||||
ColumnDefinitions="*,*">
|
||||
<controls:ExtendedDatePicker
|
||||
x:Name="_datePicker"
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui;
|
||||
using CommunityToolkit.Maui.Converters;
|
||||
using CommunityToolkit.Maui.ImageSources;
|
||||
using CommunityToolkit.Maui;
|
||||
using CommunityToolkit.Maui.Core;
|
||||
using CommunityToolkit.Maui.Layouts;
|
||||
using CommunityToolkit.Maui.Views;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
@@ -32,6 +25,11 @@ namespace Bit.App.Controls
|
||||
_timePicker.PlaceHolder = dateTimeViewModel.TimePlaceholder;
|
||||
}
|
||||
}
|
||||
|
||||
private void DateTimePicker_OnUnloaded(object sender, EventArgs e)
|
||||
{
|
||||
_datePicker?.DisconnectHandler();
|
||||
}
|
||||
}
|
||||
|
||||
public class LazyDateTimePicker : LazyView<DateTimePicker>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Bit.Core.Utilities;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
public class ExtendedDatePicker : DatePicker
|
||||
{
|
||||
@@ -83,5 +79,11 @@ namespace Bit.App.Controls
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Currently the Disconnect Handler needs to be manually called from the App: https://github.com/dotnet/maui/issues/3604
|
||||
public void DisconnectHandler()
|
||||
{
|
||||
Handler?.DisconnectHandler();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
public class ExtendedTimePicker : TimePicker
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user