Fix issue wtih toolbar

This commit is contained in:
ahjephson
2025-10-19 19:13:09 +01:00
parent b02bb7cfae
commit 2c744cd972
4 changed files with 59 additions and 12 deletions

View File

@@ -63,6 +63,7 @@ namespace Lantean.QBTMud.Layout
private IReadOnlyList<Torrent> _visibleTorrents = Array.Empty<Torrent>();
private bool _torrentsDirty = true;
private int _torrentsVersion;
private IReadOnlyList<Torrent> GetTorrents()
{
@@ -157,6 +158,10 @@ namespace Lantean.QBTMud.Layout
{
MarkTorrentsDirty();
}
else if (dataChanged)
{
IncrementTorrentsVersion();
}
shouldRender = dataChanged;
}
@@ -256,6 +261,15 @@ namespace Lantean.QBTMud.Layout
private void MarkTorrentsDirty()
{
_torrentsDirty = true;
IncrementTorrentsVersion();
}
private void IncrementTorrentsVersion()
{
unchecked
{
_torrentsVersion++;
}
}