mirror of
https://github.com/bitwarden/android.git
synced 2024-12-21 00:31:58 +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,8 +73,17 @@ namespace Bit.App.Pages
|
|||
private void SetLastSync()
|
||||
{
|
||||
var lastSyncDate = _settings.GetValueOrDefault<DateTime?>(Constants.LastSync);
|
||||
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