Add debug code for testing
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/WalletBalanceChartTileViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/WalletBalanceChartTileViewModel.cs
@@ -111,6 +111,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
private void UpdateSample(TimeSpan sampleTime, TimeSpan sampleBackFor)
{
+ Console.WriteLine($"[WalletBalanceChartTile] UpdateSample()");
StopTimer();
var sampleLimit = DateTimeOffset.Now - sampleBackFor;
@@ -217,11 +218,13 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
{
if (source.XValues.Count > 0 && target.XValues.Count > 0)
{
+ Console.WriteLine($"[WalletBalanceChartTile] UpdateValues() - Animation: source.XValues.Count='{source.XValues.Count}', target.XValues.Count='{target.XValues.Count}'");
CreateAnimation(source, target);
StartTimer();
}
else
{
+ Console.WriteLine($"[WalletBalanceChartTile] UpdateValues() - No Animation");
XValues = target.XValues;
YValues = target.YValues;
}
@@ -232,10 +235,12 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
_totalAnimationFrames = (int)(1 / _animationSpeed);
_animationFrames = PolyLineMorph.ToCache(source, target, _animationSpeed, _animationEasing);
_currentAnimationFrame = 0;
+ Console.WriteLine($"[WalletBalanceChartTile] CreateAnimation(): {_currentAnimationFrame}/{_totalAnimationFrames}");
}
private void StartTimer()
{
+ Console.WriteLine($"[WalletBalanceChartTile] StartTimer()");
if (_timer is null)
{
_timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1 / 60.0) };
@@ -248,12 +253,14 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
private void StopTimer()
{
+ Console.WriteLine($"[WalletBalanceChartTile] StopTimer()");
_timer?.Stop();
_isAnimationaRunning = false;
}
private void AnimationTimerOnTick(object? sender, EventArgs e)
{
+ Console.WriteLine($"[WalletBalanceChartTile] AnimationTimerOnTick(): {_currentAnimationFrame}/{_totalAnimationFrames}");
if (_animationFrames is null)
{
return;
@@ -264,6 +271,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
if (_currentAnimationFrame >= _totalAnimationFrames)
{
+ Console.WriteLine($"[WalletBalanceChartTile] AnimationTimerOnTick() - StopTimer(): {_currentAnimationFrame}/{_totalAnimationFrames}");
StopTimer();
}
}

Add debug code for testing