From cc306e0e19bbe4e028541285987898708976ce5f Mon Sep 17 00:00:00 2001 From: MBucari Date: Sat, 11 Mar 2023 12:28:34 -0700 Subject: [PATCH] Fix expand/collapse button icon in Avalonia --- Source/LibationUiBase/GridView/EntryStatus.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/LibationUiBase/GridView/EntryStatus.cs b/Source/LibationUiBase/GridView/EntryStatus.cs index 615fcf99..1abeded9 100644 --- a/Source/LibationUiBase/GridView/EntryStatus.cs +++ b/Source/LibationUiBase/GridView/EntryStatus.cs @@ -38,7 +38,18 @@ namespace LibationUiBase.GridView } } - public bool Expanded { get; set; } + public bool Expanded + { + get => expanded; + set + { + if (value != expanded) + { + expanded = value; + Invalidate(nameof(Expanded), nameof(ButtonImage)); + } + } + } public bool IsSeries { get; } public bool IsEpisode { get; } public bool IsBook => !IsSeries && !IsEpisode; @@ -51,6 +62,7 @@ namespace LibationUiBase.GridView private DateTime lastBookUpdate; private LiberatedStatus bookStatus; + private bool expanded; private readonly bool isAbsent; private static readonly Dictionary iconCache = new();