diff --git a/MainForm.cs b/MainForm.cs index 57bb500..7a63ed2 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -691,7 +691,6 @@ namespace FizzyLauncher #endregion - private async void treeView1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { TreeNode tn = treeView1.SelectedNode; @@ -1072,9 +1071,9 @@ namespace FizzyLauncher Image icon = null; // retrieve icon from DB - if (!string.IsNullOrWhiteSpace(model.SiteName)) + if (!string.IsNullOrWhiteSpace(model.SiteAddress)) { - string iconID = Crypto.GetSHA256Hash(model?.SiteName); + string iconID = Crypto.GetSHA256Hash(model?.SiteAddress); icon = iconDatabase.FindIcon(iconID); } @@ -1082,7 +1081,7 @@ namespace FizzyLauncher BookmarkForm bookmarkForm = new BookmarkForm(model, icon); if (bookmarkForm.ShowDialog() == DialogResult.OK) { - string iconID = Crypto.GetSHA256Hash(bookmarkForm.Model.Item?.SiteName); + string iconID = Crypto.GetSHA256Hash(bookmarkForm.Model.Item?.SiteAddress); if (!string.IsNullOrWhiteSpace(iconID)) { iconDatabase.AddIcon(iconID, bookmarkForm.Model.Icon); diff --git a/Windows/Forms/BookmarkTreeView.cs b/Windows/Forms/BookmarkTreeView.cs index e2d4496..238f714 100644 --- a/Windows/Forms/BookmarkTreeView.cs +++ b/Windows/Forms/BookmarkTreeView.cs @@ -878,9 +878,9 @@ namespace RyzStudio.Windows.Forms { if (this.IconDatabase == null) return (int)IconSet.Default; if (item == null) return (int)IconSet.Default; - if (string.IsNullOrWhiteSpace(item.SiteName)) return (int)IconSet.Default; + if (string.IsNullOrWhiteSpace(item.SiteAddress)) return (int)IconSet.Default; - string iconID = Crypto.GetSHA256Hash(item?.SiteName); + string iconID = Crypto.GetSHA256Hash(item?.SiteAddress); Image image = this.IconDatabase.FindIcon(iconID); if (image == null) @@ -896,8 +896,6 @@ namespace RyzStudio.Windows.Forms ThreadControl.Add(this, this.ImageList, iconID, image); return this.ImageList.Images.IndexOfKey(iconID); - - //return (int)IconSet.Default; } //protected int addIcon(BookmarkItemViewModel viewModel) => addIcon(viewModel.ToModel());