mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-21 11:25:56 +01:00
Catch Date toString exceptions to resolve crashing
This commit is contained in:
parent
aac4aafde0
commit
185e234ef2
@ -73,7 +73,16 @@ namespace Bit.App.Pages
|
||||
private void SetLastSync()
|
||||
{
|
||||
var lastSyncDate = _settings.GetValueOrDefault<DateTime?>(Constants.LastSync);
|
||||
LastSyncLabel.Text = "Last Sync: " + lastSyncDate?.ToLocalTime().ToString() ?? "Never";
|
||||
try
|
||||
{
|
||||
LastSyncLabel.Text = "Last Sync: " + lastSyncDate?.ToLocalTime().ToString() ?? "Never";
|
||||
}
|
||||
catch
|
||||
{
|
||||
// some users with different calendars have issues with ToString()ing a date
|
||||
// it seems the linker is at fault. just catch for now since this isn't that important.
|
||||
// ref http://bit.ly/2c2JU7b
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SyncAsync()
|
||||
|
Loading…
Reference in New Issue
Block a user