Skip to content

Commit

Permalink
Fixed menu refresh issue (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Apr 20, 2024
1 parent b8056b7 commit d6a1ad7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ColorPicker/Pages/ConverterPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ internal void LoadBookmarkMenu()
// Load bookmark menu
for (int i = 0; i < Global.Bookmarks.ColorCollections.Count; i++)
{
bool isAddedAlready = Global.Bookmarks.ColorCollections[i].Colors.Contains(ColorInfo.HEX.Value);
bool isAddedAlready = Global.Bookmarks.ColorCollections[i].Colors.Contains(ColorInfo.HEX.Value) || Global.Bookmarks.ColorCollections[i].Colors.Contains(ColorInfo.HEX.Value[1..]);
Button button = new()
{
Content = isAddedAlready ? string.Format(Properties.Resources.RemoveFrom, Global.Bookmarks.ColorCollections[i].Name) : string.Format(Properties.Resources.AddTo, Global.Bookmarks.ColorCollections[i].Name),
Expand Down
1 change: 1 addition & 0 deletions ColorPicker/UserControls/CollectionItem.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ private void InitUI()
{
Global.ConverterPage.ColorInfo = new(color);
Global.ConverterPage.LoadDetails(true);
Global.ConverterPage.LoadBookmarkMenu();
GoClick?.Invoke(this, new(AppPages.Converter));
};

Expand Down

0 comments on commit d6a1ad7

Please sign in to comment.