2021-09-22 23:09:30 +00:00
|
|
|
|
using Flow.Launcher.Plugin.BrowserBookmark.Models;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
2024-04-16 07:00:19 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin.BrowserBookmark;
|
|
|
|
|
|
|
|
|
|
|
|
public class CustomChromiumBookmarkLoader : ChromiumBookmarkLoader
|
2021-09-22 23:09:30 +00:00
|
|
|
|
{
|
2024-04-16 07:00:19 +00:00
|
|
|
|
public CustomChromiumBookmarkLoader(CustomBrowser browser)
|
2021-09-22 23:09:30 +00:00
|
|
|
|
{
|
2024-04-16 07:00:19 +00:00
|
|
|
|
BrowserName = browser.Name;
|
|
|
|
|
|
BrowserDataPath = browser.DataDirectoryPath;
|
2021-09-22 23:09:30 +00:00
|
|
|
|
}
|
2024-04-16 07:00:19 +00:00
|
|
|
|
public string BrowserDataPath { get; init; }
|
|
|
|
|
|
public string BookmarkFilePath { get; init; }
|
|
|
|
|
|
public string BrowserName { get; init; }
|
|
|
|
|
|
|
|
|
|
|
|
public override List<Bookmark> GetBookmarks() => BrowserDataPath != null ? LoadBookmarks(BrowserDataPath, BrowserName) : LoadBookmarksFromFile(BookmarkFilePath, BrowserName);
|
|
|
|
|
|
}
|