Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions App.Avalonia/Views/TrayWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public partial class TrayWindow : Window
private bool _positionUpdateQueued;
private int _sizeChangedCount;
private DateTime _lastSizeChangedLogUtc = DateTime.MinValue;
private DispatcherTimer? _uiHeartbeatTimer;

// Parameterless constructor keeps the XAML runtime loader/designer path valid.
public TrayWindow()
Expand Down Expand Up @@ -90,17 +89,7 @@ public TrayWindow()
QueuePositionUpdate();
};

Closed += (_, _) =>
{
_uiHeartbeatTimer?.Stop();
DetachRuntimeStateListeners();
};

_uiHeartbeatTimer = new DispatcherTimer(TimeSpan.FromSeconds(5), DispatcherPriority.Background, (_, _) =>
{
AppBootstrapLogger.Info($"UI heartbeat page={_vm.Page} visible={IsVisible} frame={FrameSize?.Width}x{FrameSize?.Height}");
});
_uiHeartbeatTimer.Start();
Closed += (_, _) => DetachRuntimeStateListeners();

// Ensure initial content is rendered even when the page value starts at Loading.
UpdatePageContent(_vm.Page);
Expand Down Expand Up @@ -232,11 +221,9 @@ private void QueuePositionUpdate()
return;

_positionUpdateQueued = true;
AppBootstrapLogger.Info("QueuePositionUpdate queued");
Dispatcher.UIThread.Post(() =>
{
_positionUpdateQueued = false;
AppBootstrapLogger.Info("QueuePositionUpdate running");
if (IsVisible)
PositionInBottomRight();
}, DispatcherPriority.Background);
Expand Down
Loading