Open links on system browser

This commit is contained in:
Juan Gilsanz Polo
2024-06-11 15:14:21 +02:00
parent 3ee194c50a
commit edf49edfa8
19 changed files with 243 additions and 53 deletions

View File

@@ -13,3 +13,14 @@ enum ReadStatus { all, unread, read }
enum SortingType { date, title }
enum SortingWay { descendant, ascendant }
enum OpenLinksBrowser { integrated, browserCustomTab, systemBrowser }
extension OpenLinksBrowserExtension on OpenLinksBrowser {
static OpenLinksBrowser? fromString(String? value) {
if (value == null || !OpenLinksBrowser.values.map((v) => v.toString()).contains(value)) {
return null;
}
return OpenLinksBrowser.values.firstWhere((e) => e.toString() == value);
}
}

View File

@@ -5,4 +5,5 @@ class SharedPreferencesKeys {
static const selectedColor = "selectedColor";
static const useInAppBrowser = "useInAppBrowser";
static const showFavicon = "showFavicon";
static const openLinksBrowser = "openLinksBrowser";
}