add setting to block http protocol
This commit is contained in:
@@ -13,6 +13,7 @@ class Settings with FastEquatable {
|
||||
final bool enableJavascript;
|
||||
final bool launchUrlExternal;
|
||||
final bool enableContentBlocking;
|
||||
final bool blockHttpProtocol;
|
||||
final Set<HostSource> enableHostList;
|
||||
final ThemeMode themeMode;
|
||||
|
||||
@@ -23,6 +24,7 @@ class Settings with FastEquatable {
|
||||
required this.enableJavascript,
|
||||
required this.launchUrlExternal,
|
||||
required this.enableContentBlocking,
|
||||
required this.blockHttpProtocol,
|
||||
required this.enableHostList,
|
||||
required this.themeMode,
|
||||
});
|
||||
@@ -34,6 +36,7 @@ class Settings with FastEquatable {
|
||||
bool? enableJavascript,
|
||||
bool? launchUrlExternal,
|
||||
bool? enableContentBlocking,
|
||||
bool? blockHttpProtocol,
|
||||
Set<HostSource>? enableHostList,
|
||||
ThemeMode? themeMode,
|
||||
}) : showEarlyAccessFeatures = showEarlyAccessFeatures ?? true,
|
||||
@@ -41,6 +44,7 @@ class Settings with FastEquatable {
|
||||
enableJavascript = enableJavascript ?? true,
|
||||
launchUrlExternal = launchUrlExternal ?? false,
|
||||
enableContentBlocking = enableContentBlocking ?? true,
|
||||
blockHttpProtocol = blockHttpProtocol ?? false,
|
||||
enableHostList = enableHostList ?? {HostSource.stevenBlackUnified},
|
||||
themeMode = themeMode ?? ThemeMode.dark;
|
||||
|
||||
@@ -55,6 +59,7 @@ class Settings with FastEquatable {
|
||||
enableJavascript,
|
||||
launchUrlExternal,
|
||||
enableContentBlocking,
|
||||
blockHttpProtocol,
|
||||
enableHostList,
|
||||
themeMode,
|
||||
];
|
||||
|
||||
@@ -19,6 +19,8 @@ abstract class _$SettingsCWProxy {
|
||||
|
||||
Settings enableContentBlocking(bool enableContentBlocking);
|
||||
|
||||
Settings blockHttpProtocol(bool blockHttpProtocol);
|
||||
|
||||
Settings enableHostList(Set<HostSource> enableHostList);
|
||||
|
||||
Settings themeMode(ThemeMode themeMode);
|
||||
@@ -36,6 +38,7 @@ abstract class _$SettingsCWProxy {
|
||||
bool? enableJavascript,
|
||||
bool? launchUrlExternal,
|
||||
bool? enableContentBlocking,
|
||||
bool? blockHttpProtocol,
|
||||
Set<HostSource>? enableHostList,
|
||||
ThemeMode? themeMode,
|
||||
});
|
||||
@@ -70,6 +73,10 @@ class _$SettingsCWProxyImpl implements _$SettingsCWProxy {
|
||||
Settings enableContentBlocking(bool enableContentBlocking) =>
|
||||
this(enableContentBlocking: enableContentBlocking);
|
||||
|
||||
@override
|
||||
Settings blockHttpProtocol(bool blockHttpProtocol) =>
|
||||
this(blockHttpProtocol: blockHttpProtocol);
|
||||
|
||||
@override
|
||||
Settings enableHostList(Set<HostSource> enableHostList) =>
|
||||
this(enableHostList: enableHostList);
|
||||
@@ -92,6 +99,7 @@ class _$SettingsCWProxyImpl implements _$SettingsCWProxy {
|
||||
Object? enableJavascript = const $CopyWithPlaceholder(),
|
||||
Object? launchUrlExternal = const $CopyWithPlaceholder(),
|
||||
Object? enableContentBlocking = const $CopyWithPlaceholder(),
|
||||
Object? blockHttpProtocol = const $CopyWithPlaceholder(),
|
||||
Object? enableHostList = const $CopyWithPlaceholder(),
|
||||
Object? themeMode = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
@@ -127,6 +135,11 @@ class _$SettingsCWProxyImpl implements _$SettingsCWProxy {
|
||||
? _value.enableContentBlocking
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: enableContentBlocking as bool,
|
||||
blockHttpProtocol: blockHttpProtocol == const $CopyWithPlaceholder() ||
|
||||
blockHttpProtocol == null
|
||||
? _value.blockHttpProtocol
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: blockHttpProtocol as bool,
|
||||
enableHostList: enableHostList == const $CopyWithPlaceholder() ||
|
||||
enableHostList == null
|
||||
? _value.enableHostList
|
||||
|
||||
Reference in New Issue
Block a user