mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
Catch Date toString exceptions to resolve crashing
This commit is contained in:
parent
aac4aafde0
commit
185e234ef2
1 changed files with 10 additions and 1 deletions
|
@ -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 a new issue