2021-09-22 23:09:30 +00:00
|
|
|
|
using System.Collections.Generic;
|
2019-08-06 10:36:28 +00:00
|
|
|
|
|
2024-04-16 07:00:19 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin.BrowserBookmark.Models;
|
|
|
|
|
|
|
|
|
|
|
|
// Source may be important in the future
|
|
|
|
|
|
public record Bookmark(string Name, string Url, string Source = "")
|
2019-08-06 10:36:28 +00:00
|
|
|
|
{
|
2024-04-16 07:00:19 +00:00
|
|
|
|
public override int GetHashCode()
|
2019-08-06 10:36:28 +00:00
|
|
|
|
{
|
2024-04-16 07:00:19 +00:00
|
|
|
|
var hashName = Name?.GetHashCode() ?? 0;
|
|
|
|
|
|
var hashUrl = Url?.GetHashCode() ?? 0;
|
|
|
|
|
|
return hashName ^ hashUrl;
|
|
|
|
|
|
}
|
2021-09-22 23:09:30 +00:00
|
|
|
|
|
2024-04-16 07:00:19 +00:00
|
|
|
|
public virtual bool Equals(Bookmark other)
|
|
|
|
|
|
{
|
|
|
|
|
|
return other != null && Name == other.Name && Url == other.Url;
|
2019-08-06 10:36:28 +00:00
|
|
|
|
}
|
2024-04-16 07:00:19 +00:00
|
|
|
|
|
|
|
|
|
|
public List<CustomBrowser> CustomBrowsers { get; set; } = new();
|
2025-03-19 20:04:19 +00:00
|
|
|
|
public string FaviconPath { get; set; } = string.Empty;
|
2024-04-16 07:00:19 +00:00
|
|
|
|
}
|