Merge branch 'main' into tor_proxy
This commit is contained in:
@@ -31,6 +31,8 @@ const _fallbackAutocompleteProvider = SearchSuggestionProviders.none;
|
||||
|
||||
enum TabBarSwipeAction { switchLastOpened, navigateOrderedTabs }
|
||||
|
||||
enum TabIntentOpenSetting { regular, private, ask }
|
||||
|
||||
enum DeleteBrowsingDataType {
|
||||
tabs('Open tabs'),
|
||||
history('Browsing history'),
|
||||
@@ -58,7 +60,7 @@ class GeneralSettings with FastEquatable {
|
||||
final bool showExtensionShortcut;
|
||||
final bool enableLocalAiFeatures;
|
||||
final TabType defaultCreateTabType;
|
||||
final TabType defaultIntentTabType;
|
||||
final TabIntentOpenSetting tabIntentOpenSetting;
|
||||
final bool autoHideTabBar;
|
||||
final TabBarSwipeAction tabBarSwipeAction;
|
||||
|
||||
@@ -73,7 +75,7 @@ class GeneralSettings with FastEquatable {
|
||||
required this.showExtensionShortcut,
|
||||
required this.enableLocalAiFeatures,
|
||||
required this.defaultCreateTabType,
|
||||
required this.defaultIntentTabType,
|
||||
required this.tabIntentOpenSetting,
|
||||
required this.autoHideTabBar,
|
||||
required this.tabBarSwipeAction,
|
||||
});
|
||||
@@ -89,7 +91,7 @@ class GeneralSettings with FastEquatable {
|
||||
bool? showExtensionShortcut,
|
||||
bool? enableLocalAiFeatures,
|
||||
TabType? defaultCreateTabType,
|
||||
TabType? defaultIntentTabType,
|
||||
TabIntentOpenSetting? tabIntentOpenSetting,
|
||||
bool? autoHideTabBar,
|
||||
TabBarSwipeAction? tabBarSwipeAction,
|
||||
}) : themeMode = themeMode ?? ThemeMode.dark,
|
||||
@@ -102,7 +104,7 @@ class GeneralSettings with FastEquatable {
|
||||
showExtensionShortcut = showExtensionShortcut ?? false,
|
||||
enableLocalAiFeatures = enableLocalAiFeatures ?? true,
|
||||
defaultCreateTabType = defaultCreateTabType ?? TabType.regular,
|
||||
defaultIntentTabType = defaultIntentTabType ?? TabType.regular,
|
||||
tabIntentOpenSetting = tabIntentOpenSetting ?? TabIntentOpenSetting.ask,
|
||||
autoHideTabBar = autoHideTabBar ?? true,
|
||||
tabBarSwipeAction =
|
||||
tabBarSwipeAction ?? TabBarSwipeAction.switchLastOpened;
|
||||
@@ -124,7 +126,7 @@ class GeneralSettings with FastEquatable {
|
||||
showExtensionShortcut,
|
||||
enableLocalAiFeatures,
|
||||
defaultCreateTabType,
|
||||
defaultIntentTabType,
|
||||
tabIntentOpenSetting,
|
||||
autoHideTabBar,
|
||||
tabBarSwipeAction,
|
||||
];
|
||||
|
||||
@@ -31,7 +31,9 @@ abstract class _$GeneralSettingsCWProxy {
|
||||
|
||||
GeneralSettings defaultCreateTabType(TabType defaultCreateTabType);
|
||||
|
||||
GeneralSettings defaultIntentTabType(TabType defaultIntentTabType);
|
||||
GeneralSettings tabIntentOpenSetting(
|
||||
TabIntentOpenSetting tabIntentOpenSetting,
|
||||
);
|
||||
|
||||
GeneralSettings autoHideTabBar(bool autoHideTabBar);
|
||||
|
||||
@@ -54,7 +56,7 @@ abstract class _$GeneralSettingsCWProxy {
|
||||
bool showExtensionShortcut,
|
||||
bool enableLocalAiFeatures,
|
||||
TabType defaultCreateTabType,
|
||||
TabType defaultIntentTabType,
|
||||
TabIntentOpenSetting tabIntentOpenSetting,
|
||||
bool autoHideTabBar,
|
||||
TabBarSwipeAction tabBarSwipeAction,
|
||||
});
|
||||
@@ -108,8 +110,9 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
|
||||
this(defaultCreateTabType: defaultCreateTabType);
|
||||
|
||||
@override
|
||||
GeneralSettings defaultIntentTabType(TabType defaultIntentTabType) =>
|
||||
this(defaultIntentTabType: defaultIntentTabType);
|
||||
GeneralSettings tabIntentOpenSetting(
|
||||
TabIntentOpenSetting tabIntentOpenSetting,
|
||||
) => this(tabIntentOpenSetting: tabIntentOpenSetting);
|
||||
|
||||
@override
|
||||
GeneralSettings autoHideTabBar(bool autoHideTabBar) =>
|
||||
@@ -137,7 +140,7 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
|
||||
Object? showExtensionShortcut = const $CopyWithPlaceholder(),
|
||||
Object? enableLocalAiFeatures = const $CopyWithPlaceholder(),
|
||||
Object? defaultCreateTabType = const $CopyWithPlaceholder(),
|
||||
Object? defaultIntentTabType = const $CopyWithPlaceholder(),
|
||||
Object? tabIntentOpenSetting = const $CopyWithPlaceholder(),
|
||||
Object? autoHideTabBar = const $CopyWithPlaceholder(),
|
||||
Object? tabBarSwipeAction = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
@@ -188,10 +191,10 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
|
||||
? _value.defaultCreateTabType
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: defaultCreateTabType as TabType,
|
||||
defaultIntentTabType: defaultIntentTabType == const $CopyWithPlaceholder()
|
||||
? _value.defaultIntentTabType
|
||||
tabIntentOpenSetting: tabIntentOpenSetting == const $CopyWithPlaceholder()
|
||||
? _value.tabIntentOpenSetting
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: defaultIntentTabType as TabType,
|
||||
: tabIntentOpenSetting as TabIntentOpenSetting,
|
||||
autoHideTabBar: autoHideTabBar == const $CopyWithPlaceholder()
|
||||
? _value.autoHideTabBar
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
@@ -235,9 +238,9 @@ GeneralSettings _$GeneralSettingsFromJson(Map<String, dynamic> json) =>
|
||||
_$TabTypeEnumMap,
|
||||
json['defaultCreateTabType'],
|
||||
),
|
||||
defaultIntentTabType: $enumDecodeNullable(
|
||||
_$TabTypeEnumMap,
|
||||
json['defaultIntentTabType'],
|
||||
tabIntentOpenSetting: $enumDecodeNullable(
|
||||
_$TabIntentOpenSettingEnumMap,
|
||||
json['tabIntentOpenSetting'],
|
||||
),
|
||||
autoHideTabBar: json['autoHideTabBar'] as bool?,
|
||||
tabBarSwipeAction: $enumDecodeNullable(
|
||||
@@ -297,6 +300,12 @@ const _$TabTypeEnumMap = {
|
||||
TabType.child: 'child',
|
||||
};
|
||||
|
||||
const _$TabIntentOpenSettingEnumMap = {
|
||||
TabIntentOpenSetting.regular: 'regular',
|
||||
TabIntentOpenSetting.private: 'private',
|
||||
TabIntentOpenSetting.ask: 'ask',
|
||||
};
|
||||
|
||||
const _$TabBarSwipeActionEnumMap = {
|
||||
TabBarSwipeAction.switchLastOpened: 'switchLastOpened',
|
||||
TabBarSwipeAction.navigateOrderedTabs: 'navigateOrderedTabs',
|
||||
|
||||
Reference in New Issue
Block a user