feat: several fixes.

This commit is contained in:
rabbitism
2024-02-19 17:56:49 +08:00
parent 9b5db3ce87
commit 966db68423
5 changed files with 62 additions and 5 deletions

View File

@@ -62,7 +62,15 @@ public class DateDisplay : NumberDisplayer<DateTime>
public override DateTime Interpolate(double progress, DateTime oldValue, DateTime newValue)
{
var diff = (newValue - oldValue).TotalSeconds;
return oldValue + TimeSpan.FromSeconds(diff * progress);
try
{
return oldValue + TimeSpan.FromSeconds(diff * progress);
}
catch
{
return oldValue;
}
}
}