mirror of
https://github.com/bitwarden/android.git
synced 2024-12-27 11:28:28 +03:00
PM-3349 PM-3350 MAUI Migration fix nullable bindings and fallbacks
This commit is contained in:
parent
b8f0747dd4
commit
d17789d5ee
3 changed files with 6 additions and 4 deletions
|
@ -37,7 +37,7 @@ namespace Bit.App.Pages
|
||||||
set => SetProperty(ref _cipher, value, additionalPropertyNames: AdditionalPropertiesToRaiseOnCipherChanged);
|
set => SetProperty(ref _cipher, value, additionalPropertyNames: AdditionalPropertiesToRaiseOnCipherChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string CreationDate => string.Format(AppResources.CreatedXY, Cipher.CreationDate.ToShortDateString(), Cipher.CreationDate.ToShortTimeString());
|
public string CreationDate => string.Format(AppResources.CreatedXY, Cipher?.CreationDate.ToShortDateString(), Cipher?.CreationDate.ToShortTimeString());
|
||||||
|
|
||||||
public AsyncCommand CheckPasswordCommand { get; }
|
public AsyncCommand CheckPasswordCommand { get; }
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
StyleClass="box-label" />
|
StyleClass="box-label" />
|
||||||
<Entry
|
<Entry
|
||||||
x:Name="_nameEntry"
|
x:Name="_nameEntry"
|
||||||
Text="{Binding Cipher.Name}"
|
Text="{Binding Cipher.Name, FallbackValue=''}"
|
||||||
StyleClass="box-value"
|
StyleClass="box-value"
|
||||||
AutomationProperties.IsInAccessibleTree="True"
|
AutomationProperties.IsInAccessibleTree="True"
|
||||||
SemanticProperties.Description="{u:I18n Name}"
|
SemanticProperties.Description="{u:I18n Name}"
|
||||||
|
@ -219,7 +219,7 @@
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
AutomationProperties.IsInAccessibleTree="True"
|
AutomationProperties.IsInAccessibleTree="True"
|
||||||
SemanticProperties.Description="{u:I18n GeneratePassword}"
|
SemanticProperties.Description="{u:I18n GeneratePassword}"
|
||||||
IsVisible="{Binding Cipher.ViewPassword}"
|
IsVisible="{Binding Cipher.ViewPassword, FallbackValue=False}"
|
||||||
AutomationId="RegeneratePasswordButton" />
|
AutomationId="RegeneratePasswordButton" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@ using Microsoft.Maui.Controls;
|
||||||
using Microsoft.Maui;
|
using Microsoft.Maui;
|
||||||
using Bit.App.Utilities;
|
using Bit.App.Utilities;
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
namespace Bit.App.Pages
|
namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
public class CipherAddEditPageViewModel : BaseCipherViewModel
|
public class CipherAddEditPageViewModel : BaseCipherViewModel
|
||||||
|
@ -883,7 +885,7 @@ namespace Bit.App.Pages
|
||||||
Cipher.OrganizationId = OwnershipOptions[OwnershipSelectedIndex].Value;
|
Cipher.OrganizationId = OwnershipOptions[OwnershipSelectedIndex].Value;
|
||||||
TriggerCipherChanged();
|
TriggerCipherChanged();
|
||||||
}
|
}
|
||||||
if (Cipher.OrganizationId != null)
|
if (Cipher?.OrganizationId != null)
|
||||||
{
|
{
|
||||||
var cols = _writeableCollections.Where(c => c.OrganizationId == Cipher.OrganizationId)
|
var cols = _writeableCollections.Where(c => c.OrganizationId == Cipher.OrganizationId)
|
||||||
.Select(c => new CollectionViewModel { Collection = c }).ToList();
|
.Select(c => new CollectionViewModel { Collection = c }).ToList();
|
||||||
|
|
Loading…
Reference in a new issue