added quick tab switcher mode setting
This commit is contained in:
@@ -33,13 +33,14 @@ import 'package:weblibre/features/geckoview/features/tabs/data/entities/containe
|
|||||||
import 'package:weblibre/features/geckoview/features/tabs/data/entities/tab_entity.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/data/entities/tab_entity.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/container_data.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/data/models/container_data.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/domain/providers.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/domain/providers.dart';
|
||||||
|
import 'package:weblibre/features/geckoview/features/tabs/domain/providers/selected_container.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/domain/repositories/gecko_inference.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/domain/repositories/gecko_inference.dart';
|
||||||
import 'package:weblibre/features/geckoview/features/tabs/domain/repositories/tab_search.dart';
|
import 'package:weblibre/features/geckoview/features/tabs/domain/repositories/tab_search.dart';
|
||||||
import 'package:weblibre/features/user/domain/repositories/general_settings.dart';
|
import 'package:weblibre/features/user/domain/repositories/general_settings.dart';
|
||||||
|
|
||||||
part 'providers.g.dart';
|
part 'providers.g.dart';
|
||||||
|
|
||||||
typedef FifoTab = (TabState, ContainerData?);
|
typedef TabStateWirthContainer = (TabState, ContainerData?);
|
||||||
|
|
||||||
@Riverpod(keepAlive: true)
|
@Riverpod(keepAlive: true)
|
||||||
class SelectedBangTrigger extends _$SelectedBangTrigger {
|
class SelectedBangTrigger extends _$SelectedBangTrigger {
|
||||||
@@ -85,7 +86,7 @@ class SelectedBangData extends _$SelectedBangData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Riverpod()
|
@Riverpod()
|
||||||
EquatableValue<List<DefaultTabEntity>> availableTabIds(
|
EquatableValue<List<DefaultTabEntity>> containerTabEntities(
|
||||||
Ref ref,
|
Ref ref,
|
||||||
ContainerFilter containerFilter,
|
ContainerFilter containerFilter,
|
||||||
) {
|
) {
|
||||||
@@ -130,11 +131,13 @@ EquatableValue<List<DefaultTabEntity>> availableTabIds(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Riverpod()
|
@Riverpod()
|
||||||
EquatableValue<Map<String, TabState>> availableTabStates(
|
EquatableValue<Map<String, TabState>> containerTabStates(
|
||||||
Ref ref,
|
Ref ref,
|
||||||
ContainerFilter containerFilter,
|
ContainerFilter containerFilter,
|
||||||
) {
|
) {
|
||||||
final availableTabs = ref.watch(availableTabIdsProvider(containerFilter));
|
final availableTabs = ref.watch(
|
||||||
|
containerTabEntitiesProvider(containerFilter),
|
||||||
|
);
|
||||||
final tabStates = ref.watch(tabStatesProvider);
|
final tabStates = ref.watch(tabStatesProvider);
|
||||||
|
|
||||||
return EquatableValue({
|
return EquatableValue({
|
||||||
@@ -145,7 +148,7 @@ EquatableValue<Map<String, TabState>> availableTabStates(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Riverpod(keepAlive: true)
|
@Riverpod(keepAlive: true)
|
||||||
EquatableValue<List<FifoTab>> fifoTabStates(Ref ref) {
|
EquatableValue<List<TabStateWirthContainer>> fifoTabStates(Ref ref) {
|
||||||
final containerData = ref
|
final containerData = ref
|
||||||
.watch(watchContainersWithCountProvider.select((value) => value.value))
|
.watch(watchContainersWithCountProvider.select((value) => value.value))
|
||||||
.mapNotNull(
|
.mapNotNull(
|
||||||
@@ -153,7 +156,7 @@ EquatableValue<List<FifoTab>> fifoTabStates(Ref ref) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
final sortedTabs = ref.watch(
|
final sortedTabs = ref.watch(
|
||||||
watchgetTabsFifoProvider.select((value) => value.value),
|
watchTabsFifoProvider.select((value) => value.value),
|
||||||
);
|
);
|
||||||
|
|
||||||
final tabStates = ref.watch(tabStatesProvider);
|
final tabStates = ref.watch(tabStatesProvider);
|
||||||
@@ -171,6 +174,39 @@ EquatableValue<List<FifoTab>> fifoTabStates(Ref ref) {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Riverpod(keepAlive: true)
|
||||||
|
EquatableValue<List<TabStateWirthContainer>>
|
||||||
|
selectedContainerTabStatesWithContainer(Ref ref) {
|
||||||
|
final filter = ref.watch(
|
||||||
|
selectedContainerProvider.select(
|
||||||
|
(value) => ContainerFilterById(containerId: value),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
final containerData = ref
|
||||||
|
.watch(watchContainersWithCountProvider.select((value) => value.value))
|
||||||
|
.mapNotNull(
|
||||||
|
(value) => Map.fromEntries(value.map((c) => MapEntry(c.id, c))),
|
||||||
|
);
|
||||||
|
|
||||||
|
final sortedTabs = ref.watch(
|
||||||
|
containerTabEntitiesProvider(filter).select((value) => value.value),
|
||||||
|
);
|
||||||
|
|
||||||
|
final tabStates = ref.watch(tabStatesProvider);
|
||||||
|
|
||||||
|
return EquatableValue([
|
||||||
|
for (final tabEntity in sortedTabs)
|
||||||
|
if (tabStates.containsKey(tabEntity.tabId))
|
||||||
|
(
|
||||||
|
tabStates[tabEntity.tabId]!,
|
||||||
|
tabEntity.containerId.mapNotNull(
|
||||||
|
(containerId) => containerData?[containerId],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
@Riverpod()
|
@Riverpod()
|
||||||
EquatableValue<List<TabEntity>> suggestedTabEntities(
|
EquatableValue<List<TabEntity>> suggestedTabEntities(
|
||||||
Ref ref,
|
Ref ref,
|
||||||
@@ -244,31 +280,29 @@ EquatableValue<List<TabEntity>> seamlessFilteredTabEntities(
|
|||||||
)
|
)
|
||||||
.value;
|
.value;
|
||||||
|
|
||||||
final availableTabs = ref.watch(availableTabIdsProvider(containerFilter));
|
final availableTabs = ref.watch(
|
||||||
|
containerTabEntitiesProvider(containerFilter),
|
||||||
|
);
|
||||||
|
|
||||||
if (tabSearchResults == null) {
|
if (tabSearchResults == null) {
|
||||||
if (groupTrees) {
|
if (groupTrees) {
|
||||||
final trees = ref.watch(
|
final trees = ref.watch(
|
||||||
watchTabTreesProvider.select(
|
watchTabTreesProvider.select(
|
||||||
(value) => EquatableValue(
|
(value) => EquatableValue(
|
||||||
value.value
|
value.value?.map((tree) {
|
||||||
?.map(
|
// Find the container ID for the latest tab
|
||||||
(tree) {
|
final containerForTab = availableTabs.value
|
||||||
// Find the container ID for the latest tab
|
.where((t) => t.tabId == tree.latestTabId)
|
||||||
final containerForTab = availableTabs.value
|
.firstOrNull
|
||||||
.where((t) => t.tabId == tree.latestTabId)
|
?.containerId;
|
||||||
.firstOrNull
|
|
||||||
?.containerId;
|
|
||||||
|
|
||||||
return TabTreeEntity(
|
return TabTreeEntity(
|
||||||
tabId: tree.latestTabId,
|
tabId: tree.latestTabId,
|
||||||
containerId: containerForTab,
|
containerId: containerForTab,
|
||||||
rootId: tree.rootTabId,
|
rootId: tree.rootTabId,
|
||||||
totalTabs: tree.totalTabs,
|
totalTabs: tree.totalTabs,
|
||||||
);
|
);
|
||||||
},
|
}).toList() ??
|
||||||
)
|
|
||||||
.toList() ??
|
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -314,7 +348,7 @@ EquatableValue<List<TabPreview>> filteredTabPreviews(
|
|||||||
.value;
|
.value;
|
||||||
|
|
||||||
final availableTabStates = ref.watch(
|
final availableTabStates = ref.watch(
|
||||||
availableTabStatesProvider(containerFilter),
|
containerTabStatesProvider(containerFilter),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (tabSearchResults == null) {
|
if (tabSearchResults == null) {
|
||||||
|
|||||||
@@ -204,10 +204,10 @@ abstract class _$SelectedBangData extends $Notifier<BangData?> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProviderFor(availableTabIds)
|
@ProviderFor(containerTabEntities)
|
||||||
final availableTabIdsProvider = AvailableTabIdsFamily._();
|
final containerTabEntitiesProvider = ContainerTabEntitiesFamily._();
|
||||||
|
|
||||||
final class AvailableTabIdsProvider
|
final class ContainerTabEntitiesProvider
|
||||||
extends
|
extends
|
||||||
$FunctionalProvider<
|
$FunctionalProvider<
|
||||||
EquatableValue<List<DefaultTabEntity>>,
|
EquatableValue<List<DefaultTabEntity>>,
|
||||||
@@ -215,23 +215,23 @@ final class AvailableTabIdsProvider
|
|||||||
EquatableValue<List<DefaultTabEntity>>
|
EquatableValue<List<DefaultTabEntity>>
|
||||||
>
|
>
|
||||||
with $Provider<EquatableValue<List<DefaultTabEntity>>> {
|
with $Provider<EquatableValue<List<DefaultTabEntity>>> {
|
||||||
AvailableTabIdsProvider._({
|
ContainerTabEntitiesProvider._({
|
||||||
required AvailableTabIdsFamily super.from,
|
required ContainerTabEntitiesFamily super.from,
|
||||||
required ContainerFilter super.argument,
|
required ContainerFilter super.argument,
|
||||||
}) : super(
|
}) : super(
|
||||||
retry: null,
|
retry: null,
|
||||||
name: r'availableTabIdsProvider',
|
name: r'containerTabEntitiesProvider',
|
||||||
isAutoDispose: true,
|
isAutoDispose: true,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
$allTransitiveDependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String debugGetCreateSourceHash() => _$availableTabIdsHash();
|
String debugGetCreateSourceHash() => _$containerTabEntitiesHash();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return r'availableTabIdsProvider'
|
return r'containerTabEntitiesProvider'
|
||||||
''
|
''
|
||||||
'($argument)';
|
'($argument)';
|
||||||
}
|
}
|
||||||
@@ -245,7 +245,7 @@ final class AvailableTabIdsProvider
|
|||||||
@override
|
@override
|
||||||
EquatableValue<List<DefaultTabEntity>> create(Ref ref) {
|
EquatableValue<List<DefaultTabEntity>> create(Ref ref) {
|
||||||
final argument = this.argument as ContainerFilter;
|
final argument = this.argument as ContainerFilter;
|
||||||
return availableTabIds(ref, argument);
|
return containerTabEntities(ref, argument);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// {@macro riverpod.override_with_value}
|
/// {@macro riverpod.override_with_value}
|
||||||
@@ -259,7 +259,7 @@ final class AvailableTabIdsProvider
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is AvailableTabIdsProvider && other.argument == argument;
|
return other is ContainerTabEntitiesProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -268,34 +268,35 @@ final class AvailableTabIdsProvider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$availableTabIdsHash() => r'fa7280a7a5f9c277faa71a30f5dd50afa30a20b1';
|
String _$containerTabEntitiesHash() =>
|
||||||
|
r'350b3e2a2672ab0a303344c7d8301af24c991ee5';
|
||||||
|
|
||||||
final class AvailableTabIdsFamily extends $Family
|
final class ContainerTabEntitiesFamily extends $Family
|
||||||
with
|
with
|
||||||
$FunctionalFamilyOverride<
|
$FunctionalFamilyOverride<
|
||||||
EquatableValue<List<DefaultTabEntity>>,
|
EquatableValue<List<DefaultTabEntity>>,
|
||||||
ContainerFilter
|
ContainerFilter
|
||||||
> {
|
> {
|
||||||
AvailableTabIdsFamily._()
|
ContainerTabEntitiesFamily._()
|
||||||
: super(
|
: super(
|
||||||
retry: null,
|
retry: null,
|
||||||
name: r'availableTabIdsProvider',
|
name: r'containerTabEntitiesProvider',
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
$allTransitiveDependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
isAutoDispose: true,
|
isAutoDispose: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
AvailableTabIdsProvider call(ContainerFilter containerFilter) =>
|
ContainerTabEntitiesProvider call(ContainerFilter containerFilter) =>
|
||||||
AvailableTabIdsProvider._(argument: containerFilter, from: this);
|
ContainerTabEntitiesProvider._(argument: containerFilter, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => r'availableTabIdsProvider';
|
String toString() => r'containerTabEntitiesProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProviderFor(availableTabStates)
|
@ProviderFor(containerTabStates)
|
||||||
final availableTabStatesProvider = AvailableTabStatesFamily._();
|
final containerTabStatesProvider = ContainerTabStatesFamily._();
|
||||||
|
|
||||||
final class AvailableTabStatesProvider
|
final class ContainerTabStatesProvider
|
||||||
extends
|
extends
|
||||||
$FunctionalProvider<
|
$FunctionalProvider<
|
||||||
EquatableValue<Map<String, TabState>>,
|
EquatableValue<Map<String, TabState>>,
|
||||||
@@ -303,23 +304,23 @@ final class AvailableTabStatesProvider
|
|||||||
EquatableValue<Map<String, TabState>>
|
EquatableValue<Map<String, TabState>>
|
||||||
>
|
>
|
||||||
with $Provider<EquatableValue<Map<String, TabState>>> {
|
with $Provider<EquatableValue<Map<String, TabState>>> {
|
||||||
AvailableTabStatesProvider._({
|
ContainerTabStatesProvider._({
|
||||||
required AvailableTabStatesFamily super.from,
|
required ContainerTabStatesFamily super.from,
|
||||||
required ContainerFilter super.argument,
|
required ContainerFilter super.argument,
|
||||||
}) : super(
|
}) : super(
|
||||||
retry: null,
|
retry: null,
|
||||||
name: r'availableTabStatesProvider',
|
name: r'containerTabStatesProvider',
|
||||||
isAutoDispose: true,
|
isAutoDispose: true,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
$allTransitiveDependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String debugGetCreateSourceHash() => _$availableTabStatesHash();
|
String debugGetCreateSourceHash() => _$containerTabStatesHash();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return r'availableTabStatesProvider'
|
return r'containerTabStatesProvider'
|
||||||
''
|
''
|
||||||
'($argument)';
|
'($argument)';
|
||||||
}
|
}
|
||||||
@@ -333,7 +334,7 @@ final class AvailableTabStatesProvider
|
|||||||
@override
|
@override
|
||||||
EquatableValue<Map<String, TabState>> create(Ref ref) {
|
EquatableValue<Map<String, TabState>> create(Ref ref) {
|
||||||
final argument = this.argument as ContainerFilter;
|
final argument = this.argument as ContainerFilter;
|
||||||
return availableTabStates(ref, argument);
|
return containerTabStates(ref, argument);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// {@macro riverpod.override_with_value}
|
/// {@macro riverpod.override_with_value}
|
||||||
@@ -347,7 +348,7 @@ final class AvailableTabStatesProvider
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is AvailableTabStatesProvider && other.argument == argument;
|
return other is ContainerTabStatesProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -356,29 +357,29 @@ final class AvailableTabStatesProvider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$availableTabStatesHash() =>
|
String _$containerTabStatesHash() =>
|
||||||
r'32f15b0f739495e11025bdc10d324764465b542d';
|
r'320f35a2605b53ab57b299caafd9b71804b67c6c';
|
||||||
|
|
||||||
final class AvailableTabStatesFamily extends $Family
|
final class ContainerTabStatesFamily extends $Family
|
||||||
with
|
with
|
||||||
$FunctionalFamilyOverride<
|
$FunctionalFamilyOverride<
|
||||||
EquatableValue<Map<String, TabState>>,
|
EquatableValue<Map<String, TabState>>,
|
||||||
ContainerFilter
|
ContainerFilter
|
||||||
> {
|
> {
|
||||||
AvailableTabStatesFamily._()
|
ContainerTabStatesFamily._()
|
||||||
: super(
|
: super(
|
||||||
retry: null,
|
retry: null,
|
||||||
name: r'availableTabStatesProvider',
|
name: r'containerTabStatesProvider',
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
$allTransitiveDependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
isAutoDispose: true,
|
isAutoDispose: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
AvailableTabStatesProvider call(ContainerFilter containerFilter) =>
|
ContainerTabStatesProvider call(ContainerFilter containerFilter) =>
|
||||||
AvailableTabStatesProvider._(argument: containerFilter, from: this);
|
ContainerTabStatesProvider._(argument: containerFilter, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => r'availableTabStatesProvider';
|
String toString() => r'containerTabStatesProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProviderFor(fifoTabStates)
|
@ProviderFor(fifoTabStates)
|
||||||
@@ -387,11 +388,11 @@ final fifoTabStatesProvider = FifoTabStatesProvider._();
|
|||||||
final class FifoTabStatesProvider
|
final class FifoTabStatesProvider
|
||||||
extends
|
extends
|
||||||
$FunctionalProvider<
|
$FunctionalProvider<
|
||||||
EquatableValue<List<FifoTab>>,
|
EquatableValue<List<TabStateWirthContainer>>,
|
||||||
EquatableValue<List<FifoTab>>,
|
EquatableValue<List<TabStateWirthContainer>>,
|
||||||
EquatableValue<List<FifoTab>>
|
EquatableValue<List<TabStateWirthContainer>>
|
||||||
>
|
>
|
||||||
with $Provider<EquatableValue<List<FifoTab>>> {
|
with $Provider<EquatableValue<List<TabStateWirthContainer>>> {
|
||||||
FifoTabStatesProvider._()
|
FifoTabStatesProvider._()
|
||||||
: super(
|
: super(
|
||||||
from: null,
|
from: null,
|
||||||
@@ -408,27 +409,85 @@ final class FifoTabStatesProvider
|
|||||||
|
|
||||||
@$internal
|
@$internal
|
||||||
@override
|
@override
|
||||||
$ProviderElement<EquatableValue<List<FifoTab>>> $createElement(
|
$ProviderElement<EquatableValue<List<TabStateWirthContainer>>> $createElement(
|
||||||
$ProviderPointer pointer,
|
$ProviderPointer pointer,
|
||||||
) => $ProviderElement(pointer);
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
EquatableValue<List<FifoTab>> create(Ref ref) {
|
EquatableValue<List<TabStateWirthContainer>> create(Ref ref) {
|
||||||
return fifoTabStates(ref);
|
return fifoTabStates(ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// {@macro riverpod.override_with_value}
|
/// {@macro riverpod.override_with_value}
|
||||||
Override overrideWithValue(EquatableValue<List<FifoTab>> value) {
|
Override overrideWithValue(
|
||||||
|
EquatableValue<List<TabStateWirthContainer>> value,
|
||||||
|
) {
|
||||||
return $ProviderOverride(
|
return $ProviderOverride(
|
||||||
origin: this,
|
origin: this,
|
||||||
providerOverride: $SyncValueProvider<EquatableValue<List<FifoTab>>>(
|
providerOverride:
|
||||||
value,
|
$SyncValueProvider<EquatableValue<List<TabStateWirthContainer>>>(
|
||||||
),
|
value,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$fifoTabStatesHash() => r'0320c28b328d814ed358ec6a10ec770a1ed634ad';
|
String _$fifoTabStatesHash() => r'03298f30559d55e986d97a17d517b9a9abb89be4';
|
||||||
|
|
||||||
|
@ProviderFor(selectedContainerTabStatesWithContainer)
|
||||||
|
final selectedContainerTabStatesWithContainerProvider =
|
||||||
|
SelectedContainerTabStatesWithContainerProvider._();
|
||||||
|
|
||||||
|
final class SelectedContainerTabStatesWithContainerProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
EquatableValue<List<TabStateWirthContainer>>,
|
||||||
|
EquatableValue<List<TabStateWirthContainer>>,
|
||||||
|
EquatableValue<List<TabStateWirthContainer>>
|
||||||
|
>
|
||||||
|
with $Provider<EquatableValue<List<TabStateWirthContainer>>> {
|
||||||
|
SelectedContainerTabStatesWithContainerProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedContainerTabStatesWithContainerProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() =>
|
||||||
|
_$selectedContainerTabStatesWithContainerHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<EquatableValue<List<TabStateWirthContainer>>> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
EquatableValue<List<TabStateWirthContainer>> create(Ref ref) {
|
||||||
|
return selectedContainerTabStatesWithContainer(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(
|
||||||
|
EquatableValue<List<TabStateWirthContainer>> value,
|
||||||
|
) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride:
|
||||||
|
$SyncValueProvider<EquatableValue<List<TabStateWirthContainer>>>(
|
||||||
|
value,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$selectedContainerTabStatesWithContainerHash() =>
|
||||||
|
r'd22d16eba89040fbcf7932e5334155f00312957f';
|
||||||
|
|
||||||
@ProviderFor(suggestedTabEntities)
|
@ProviderFor(suggestedTabEntities)
|
||||||
final suggestedTabEntitiesProvider = SuggestedTabEntitiesFamily._();
|
final suggestedTabEntitiesProvider = SuggestedTabEntitiesFamily._();
|
||||||
@@ -600,7 +659,7 @@ final class SeamlessFilteredTabEntitiesProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
String _$seamlessFilteredTabEntitiesHash() =>
|
String _$seamlessFilteredTabEntitiesHash() =>
|
||||||
r'590288855aa93162a8f70d37f2b3cd94eabc85e5';
|
r'b0477aa6297183575264d54a82575dfb01fa4c32';
|
||||||
|
|
||||||
final class SeamlessFilteredTabEntitiesFamily extends $Family
|
final class SeamlessFilteredTabEntitiesFamily extends $Family
|
||||||
with
|
with
|
||||||
@@ -704,7 +763,7 @@ final class FilteredTabPreviewsProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
String _$filteredTabPreviewsHash() =>
|
String _$filteredTabPreviewsHash() =>
|
||||||
r'9fbf6774433e62ce9b63ef66f6db3446e6182109';
|
r'225d67663d70aa0ad2a5544b75bfe7d6125edb58';
|
||||||
|
|
||||||
final class FilteredTabPreviewsFamily extends $Family
|
final class FilteredTabPreviewsFamily extends $Family
|
||||||
with
|
with
|
||||||
|
|||||||
+24
-7
@@ -195,6 +195,12 @@ class BrowserTabBar extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final quickTabSwitcherMode = ref.watch(
|
||||||
|
generalSettingsWithDefaultsProvider.select(
|
||||||
|
(value) => value.quickTabSwitcherMode,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
final dragStartPosition = useRef(Offset.zero);
|
final dragStartPosition = useRef(Offset.zero);
|
||||||
|
|
||||||
final toolbarHeight = useMemoized(() => getToolbarHeight());
|
final toolbarHeight = useMemoized(() => getToolbarHeight());
|
||||||
@@ -256,7 +262,9 @@ class BrowserTabBar extends HookConsumerWidget {
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: displayQuickTabSwitcher,
|
visible: displayQuickTabSwitcher,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
child: const QuickTabSwitcher(),
|
child: QuickTabSwitcher(
|
||||||
|
quickTabSwitcherMode: quickTabSwitcherMode,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
if (showMainToolbar)
|
if (showMainToolbar)
|
||||||
Visibility(
|
Visibility(
|
||||||
@@ -442,20 +450,30 @@ class ContextualToolbar extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class QuickTabSwitcher extends HookConsumerWidget {
|
class QuickTabSwitcher extends HookConsumerWidget {
|
||||||
const QuickTabSwitcher();
|
final QuickTabSwitcherMode quickTabSwitcherMode;
|
||||||
|
|
||||||
|
const QuickTabSwitcher({required this.quickTabSwitcherMode});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final tabStates = ref.watch(fifoTabStatesProvider);
|
final selectedTabId = ref.watch(selectedTabProvider);
|
||||||
|
|
||||||
|
final tabStates = (switch (quickTabSwitcherMode) {
|
||||||
|
QuickTabSwitcherMode.lastUsedTabs => ref.watch(fifoTabStatesProvider),
|
||||||
|
QuickTabSwitcherMode.containerTabs => ref.watch(
|
||||||
|
selectedContainerTabStatesWithContainerProvider,
|
||||||
|
),
|
||||||
|
}).value.where((state) => state.$1.id != selectedTabId).toList();
|
||||||
|
|
||||||
final historyAsync = useCachedFuture(() {
|
final historyAsync = useCachedFuture(() {
|
||||||
if (tabStates.value.length <= 1) {
|
if (tabStates.isEmpty) {
|
||||||
return ref
|
return ref
|
||||||
.read(historyRepositoryProvider.notifier)
|
.read(historyRepositoryProvider.notifier)
|
||||||
.getVisitsPaginated(count: 25);
|
.getVisitsPaginated(count: 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Future.value(<VisitInfo>[]);
|
return Future.value(<VisitInfo>[]);
|
||||||
}, [tabStates.value.length <= 1]);
|
}, [tabStates.isEmpty]);
|
||||||
|
|
||||||
final chipScrollController = useScrollController();
|
final chipScrollController = useScrollController();
|
||||||
|
|
||||||
@@ -536,7 +554,7 @@ class QuickTabSwitcher extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
availableItems: tabStates.value
|
availableItems: tabStates
|
||||||
.map(
|
.map(
|
||||||
(state) => (
|
(state) => (
|
||||||
id: state.$1.id,
|
id: state.$1.id,
|
||||||
@@ -547,7 +565,6 @@ class QuickTabSwitcher extends HookConsumerWidget {
|
|||||||
color: state.$2?.color,
|
color: state.$2?.color,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.skip(1)
|
|
||||||
.followedBy(
|
.followedBy(
|
||||||
(historyAsync.data ?? []).map((state) {
|
(historyAsync.data ?? []).map((state) {
|
||||||
final url = Uri.parse(state.url);
|
final url = Uri.parse(state.url);
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ Stream<List<String>> watchContainerTabIds(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Riverpod(keepAlive: true)
|
@Riverpod(keepAlive: true)
|
||||||
Stream<List<TabData>> watchgetTabsFifo(Ref ref) {
|
Stream<List<TabData>> watchTabsFifo(Ref ref) {
|
||||||
final db = ref.watch(tabDatabaseProvider);
|
final db = ref.watch(tabDatabaseProvider);
|
||||||
|
|
||||||
return db.tabDao.getTabsFifo().watch();
|
return db.tabDao.getTabsFifo().watch();
|
||||||
|
|||||||
@@ -221,10 +221,10 @@ final class WatchContainerTabIdsFamily extends $Family
|
|||||||
String toString() => r'watchContainerTabIdsProvider';
|
String toString() => r'watchContainerTabIdsProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProviderFor(watchgetTabsFifo)
|
@ProviderFor(watchTabsFifo)
|
||||||
final watchgetTabsFifoProvider = WatchgetTabsFifoProvider._();
|
final watchTabsFifoProvider = WatchTabsFifoProvider._();
|
||||||
|
|
||||||
final class WatchgetTabsFifoProvider
|
final class WatchTabsFifoProvider
|
||||||
extends
|
extends
|
||||||
$FunctionalProvider<
|
$FunctionalProvider<
|
||||||
AsyncValue<List<TabData>>,
|
AsyncValue<List<TabData>>,
|
||||||
@@ -232,19 +232,19 @@ final class WatchgetTabsFifoProvider
|
|||||||
Stream<List<TabData>>
|
Stream<List<TabData>>
|
||||||
>
|
>
|
||||||
with $FutureModifier<List<TabData>>, $StreamProvider<List<TabData>> {
|
with $FutureModifier<List<TabData>>, $StreamProvider<List<TabData>> {
|
||||||
WatchgetTabsFifoProvider._()
|
WatchTabsFifoProvider._()
|
||||||
: super(
|
: super(
|
||||||
from: null,
|
from: null,
|
||||||
argument: null,
|
argument: null,
|
||||||
retry: null,
|
retry: null,
|
||||||
name: r'watchgetTabsFifoProvider',
|
name: r'watchTabsFifoProvider',
|
||||||
isAutoDispose: false,
|
isAutoDispose: false,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
$allTransitiveDependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String debugGetCreateSourceHash() => _$watchgetTabsFifoHash();
|
String debugGetCreateSourceHash() => _$watchTabsFifoHash();
|
||||||
|
|
||||||
@$internal
|
@$internal
|
||||||
@override
|
@override
|
||||||
@@ -254,11 +254,11 @@ final class WatchgetTabsFifoProvider
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Stream<List<TabData>> create(Ref ref) {
|
Stream<List<TabData>> create(Ref ref) {
|
||||||
return watchgetTabsFifo(ref);
|
return watchTabsFifo(ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$watchgetTabsFifoHash() => r'b0f58ca1688003ba46a55de1ca29d8253fc3de3a';
|
String _$watchTabsFifoHash() => r'9bb8729fd0c3e31b36c11ca31d6264eefd357bd9';
|
||||||
|
|
||||||
@ProviderFor(containerTabCount)
|
@ProviderFor(containerTabCount)
|
||||||
final containerTabCountProvider = ContainerTabCountFamily._();
|
final containerTabCountProvider = ContainerTabCountFamily._();
|
||||||
|
|||||||
@@ -446,6 +446,56 @@ class GeneralSettingsScreen extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 16.0,
|
||||||
|
vertical: 8,
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const ListTile(
|
||||||
|
title: Text('Quick Tab Switcher Mode'),
|
||||||
|
leading: Icon(MdiIcons.folderSettings),
|
||||||
|
contentPadding: EdgeInsets.zero,
|
||||||
|
),
|
||||||
|
RadioGroup(
|
||||||
|
groupValue: generalSettings.quickTabSwitcherMode,
|
||||||
|
onChanged: (value) async {
|
||||||
|
if (value != null) {
|
||||||
|
await ref
|
||||||
|
.read(
|
||||||
|
saveGeneralSettingsControllerProvider.notifier,
|
||||||
|
)
|
||||||
|
.save(
|
||||||
|
(currentSettings) => currentSettings.copyWith
|
||||||
|
.quickTabSwitcherMode(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: const Column(
|
||||||
|
children: [
|
||||||
|
RadioListTile.adaptive(
|
||||||
|
value: QuickTabSwitcherMode.lastUsedTabs,
|
||||||
|
title: Text('Recently Used Tabs'),
|
||||||
|
subtitle: Text(
|
||||||
|
'Recently used tabs across all containers',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
RadioListTile.adaptive(
|
||||||
|
value: QuickTabSwitcherMode.containerTabs,
|
||||||
|
title: Text('Container Tabs'),
|
||||||
|
subtitle: Text(
|
||||||
|
'Ordered tabs of the selected container',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
SwitchListTile.adaptive(
|
SwitchListTile.adaptive(
|
||||||
title: const Text('Create Child Tabs'),
|
title: const Text('Create Child Tabs'),
|
||||||
subtitle: const Text(
|
subtitle: const Text(
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ const _fallbackAutocompleteProvider = SearchSuggestionProviders.none;
|
|||||||
|
|
||||||
enum TabBarSwipeAction { switchLastOpened, navigateOrderedTabs }
|
enum TabBarSwipeAction { switchLastOpened, navigateOrderedTabs }
|
||||||
|
|
||||||
|
enum QuickTabSwitcherMode { lastUsedTabs, containerTabs }
|
||||||
|
|
||||||
enum TabIntentOpenSetting { regular, private, ask }
|
enum TabIntentOpenSetting { regular, private, ask }
|
||||||
|
|
||||||
enum TabBarPosition { top, bottom }
|
enum TabBarPosition { top, bottom }
|
||||||
@@ -77,6 +79,7 @@ class GeneralSettings with FastEquatable {
|
|||||||
final bool tabBarShowContextualBar;
|
final bool tabBarShowContextualBar;
|
||||||
final bool tabBarShowQuickTabSwitcherBar;
|
final bool tabBarShowQuickTabSwitcherBar;
|
||||||
final TabBarPosition tabBarPosition;
|
final TabBarPosition tabBarPosition;
|
||||||
|
final QuickTabSwitcherMode quickTabSwitcherMode;
|
||||||
|
|
||||||
GeneralSettings({
|
GeneralSettings({
|
||||||
required this.themeMode,
|
required this.themeMode,
|
||||||
@@ -98,6 +101,7 @@ class GeneralSettings with FastEquatable {
|
|||||||
required this.tabBarShowContextualBar,
|
required this.tabBarShowContextualBar,
|
||||||
required this.tabBarShowQuickTabSwitcherBar,
|
required this.tabBarShowQuickTabSwitcherBar,
|
||||||
required this.tabBarPosition,
|
required this.tabBarPosition,
|
||||||
|
required this.quickTabSwitcherMode,
|
||||||
});
|
});
|
||||||
|
|
||||||
GeneralSettings.withDefaults({
|
GeneralSettings.withDefaults({
|
||||||
@@ -120,6 +124,7 @@ class GeneralSettings with FastEquatable {
|
|||||||
bool? tabBarShowContextualBar,
|
bool? tabBarShowContextualBar,
|
||||||
bool? tabBarShowQuickTabSwitcherBar,
|
bool? tabBarShowQuickTabSwitcherBar,
|
||||||
TabBarPosition? tabBarPosition,
|
TabBarPosition? tabBarPosition,
|
||||||
|
QuickTabSwitcherMode? quickTabSwitcherMode,
|
||||||
}) : themeMode = themeMode ?? ThemeMode.dark,
|
}) : themeMode = themeMode ?? ThemeMode.dark,
|
||||||
enableReadability = enableReadability ?? true,
|
enableReadability = enableReadability ?? true,
|
||||||
enforceReadability = enforceReadability ?? false,
|
enforceReadability = enforceReadability ?? false,
|
||||||
@@ -140,7 +145,9 @@ class GeneralSettings with FastEquatable {
|
|||||||
tabBarReaderView = tabBarReaderView ?? false,
|
tabBarReaderView = tabBarReaderView ?? false,
|
||||||
tabBarShowContextualBar = tabBarShowContextualBar ?? true,
|
tabBarShowContextualBar = tabBarShowContextualBar ?? true,
|
||||||
tabBarShowQuickTabSwitcherBar = tabBarShowQuickTabSwitcherBar ?? true,
|
tabBarShowQuickTabSwitcherBar = tabBarShowQuickTabSwitcherBar ?? true,
|
||||||
tabBarPosition = tabBarPosition ?? TabBarPosition.bottom;
|
tabBarPosition = tabBarPosition ?? TabBarPosition.bottom,
|
||||||
|
quickTabSwitcherMode =
|
||||||
|
quickTabSwitcherMode ?? QuickTabSwitcherMode.lastUsedTabs;
|
||||||
|
|
||||||
factory GeneralSettings.fromJson(Map<String, dynamic> json) =>
|
factory GeneralSettings.fromJson(Map<String, dynamic> json) =>
|
||||||
_$GeneralSettingsFromJson(json);
|
_$GeneralSettingsFromJson(json);
|
||||||
@@ -168,5 +175,6 @@ class GeneralSettings with FastEquatable {
|
|||||||
tabBarShowContextualBar,
|
tabBarShowContextualBar,
|
||||||
tabBarShowQuickTabSwitcherBar,
|
tabBarShowQuickTabSwitcherBar,
|
||||||
tabBarPosition,
|
tabBarPosition,
|
||||||
|
quickTabSwitcherMode,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ abstract class _$GeneralSettingsCWProxy {
|
|||||||
|
|
||||||
GeneralSettings tabBarPosition(TabBarPosition tabBarPosition);
|
GeneralSettings tabBarPosition(TabBarPosition tabBarPosition);
|
||||||
|
|
||||||
|
GeneralSettings quickTabSwitcherMode(
|
||||||
|
QuickTabSwitcherMode quickTabSwitcherMode,
|
||||||
|
);
|
||||||
|
|
||||||
/// Creates a new instance with the provided field values.
|
/// Creates a new instance with the provided field values.
|
||||||
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `GeneralSettings(...).copyWith.fieldName(value)`.
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `GeneralSettings(...).copyWith.fieldName(value)`.
|
||||||
///
|
///
|
||||||
@@ -80,6 +84,7 @@ abstract class _$GeneralSettingsCWProxy {
|
|||||||
bool tabBarShowContextualBar,
|
bool tabBarShowContextualBar,
|
||||||
bool tabBarShowQuickTabSwitcherBar,
|
bool tabBarShowQuickTabSwitcherBar,
|
||||||
TabBarPosition tabBarPosition,
|
TabBarPosition tabBarPosition,
|
||||||
|
QuickTabSwitcherMode quickTabSwitcherMode,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,6 +174,11 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
|
|||||||
GeneralSettings tabBarPosition(TabBarPosition tabBarPosition) =>
|
GeneralSettings tabBarPosition(TabBarPosition tabBarPosition) =>
|
||||||
call(tabBarPosition: tabBarPosition);
|
call(tabBarPosition: tabBarPosition);
|
||||||
|
|
||||||
|
@override
|
||||||
|
GeneralSettings quickTabSwitcherMode(
|
||||||
|
QuickTabSwitcherMode quickTabSwitcherMode,
|
||||||
|
) => call(quickTabSwitcherMode: quickTabSwitcherMode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
/// Creates a new instance with the provided field values.
|
/// Creates a new instance with the provided field values.
|
||||||
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `GeneralSettings(...).copyWith.fieldName(value)`.
|
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `GeneralSettings(...).copyWith.fieldName(value)`.
|
||||||
@@ -197,6 +207,7 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
|
|||||||
Object? tabBarShowContextualBar = const $CopyWithPlaceholder(),
|
Object? tabBarShowContextualBar = const $CopyWithPlaceholder(),
|
||||||
Object? tabBarShowQuickTabSwitcherBar = const $CopyWithPlaceholder(),
|
Object? tabBarShowQuickTabSwitcherBar = const $CopyWithPlaceholder(),
|
||||||
Object? tabBarPosition = const $CopyWithPlaceholder(),
|
Object? tabBarPosition = const $CopyWithPlaceholder(),
|
||||||
|
Object? quickTabSwitcherMode = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return GeneralSettings(
|
return GeneralSettings(
|
||||||
themeMode: themeMode == const $CopyWithPlaceholder() || themeMode == null
|
themeMode: themeMode == const $CopyWithPlaceholder() || themeMode == null
|
||||||
@@ -309,6 +320,12 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
|
|||||||
? _value.tabBarPosition
|
? _value.tabBarPosition
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: tabBarPosition as TabBarPosition,
|
: tabBarPosition as TabBarPosition,
|
||||||
|
quickTabSwitcherMode:
|
||||||
|
quickTabSwitcherMode == const $CopyWithPlaceholder() ||
|
||||||
|
quickTabSwitcherMode == null
|
||||||
|
? _value.quickTabSwitcherMode
|
||||||
|
// ignore: cast_nullable_to_non_nullable
|
||||||
|
: quickTabSwitcherMode as QuickTabSwitcherMode,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -369,6 +386,10 @@ GeneralSettings _$GeneralSettingsFromJson(
|
|||||||
_$TabBarPositionEnumMap,
|
_$TabBarPositionEnumMap,
|
||||||
json['tabBarPosition'],
|
json['tabBarPosition'],
|
||||||
),
|
),
|
||||||
|
quickTabSwitcherMode: $enumDecodeNullable(
|
||||||
|
_$QuickTabSwitcherModeEnumMap,
|
||||||
|
json['quickTabSwitcherMode'],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$GeneralSettingsToJson(
|
Map<String, dynamic> _$GeneralSettingsToJson(
|
||||||
@@ -400,6 +421,8 @@ Map<String, dynamic> _$GeneralSettingsToJson(
|
|||||||
'tabBarShowContextualBar': instance.tabBarShowContextualBar,
|
'tabBarShowContextualBar': instance.tabBarShowContextualBar,
|
||||||
'tabBarShowQuickTabSwitcherBar': instance.tabBarShowQuickTabSwitcherBar,
|
'tabBarShowQuickTabSwitcherBar': instance.tabBarShowQuickTabSwitcherBar,
|
||||||
'tabBarPosition': _$TabBarPositionEnumMap[instance.tabBarPosition]!,
|
'tabBarPosition': _$TabBarPositionEnumMap[instance.tabBarPosition]!,
|
||||||
|
'quickTabSwitcherMode':
|
||||||
|
_$QuickTabSwitcherModeEnumMap[instance.quickTabSwitcherMode]!,
|
||||||
};
|
};
|
||||||
|
|
||||||
const _$ThemeModeEnumMap = {
|
const _$ThemeModeEnumMap = {
|
||||||
@@ -446,3 +469,8 @@ const _$TabBarPositionEnumMap = {
|
|||||||
TabBarPosition.top: 'top',
|
TabBarPosition.top: 'top',
|
||||||
TabBarPosition.bottom: 'bottom',
|
TabBarPosition.bottom: 'bottom',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const _$QuickTabSwitcherModeEnumMap = {
|
||||||
|
QuickTabSwitcherMode.lastUsedTabs: 'lastUsedTabs',
|
||||||
|
QuickTabSwitcherMode.containerTabs: 'containerTabs',
|
||||||
|
};
|
||||||
|
|||||||
@@ -118,6 +118,10 @@ class GeneralSettingsRepository extends _$GeneralSettingsRepository {
|
|||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
db.typeMapping,
|
db.typeMapping,
|
||||||
),
|
),
|
||||||
|
'quickTabSwitcherMode': settings['quickTabSwitcherMode']?.readAs(
|
||||||
|
DriftSqlType.string,
|
||||||
|
db.typeMapping,
|
||||||
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ final class GeneralSettingsRepositoryProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
String _$generalSettingsRepositoryHash() =>
|
String _$generalSettingsRepositoryHash() =>
|
||||||
r'09542387844db25334384af115c538348b0ad33f';
|
r'74db28f2adc4e35a4c00bb2b7f137ed05a3bc662';
|
||||||
|
|
||||||
abstract class _$GeneralSettingsRepository
|
abstract class _$GeneralSettingsRepository
|
||||||
extends $StreamNotifier<GeneralSettings> {
|
extends $StreamNotifier<GeneralSettings> {
|
||||||
|
|||||||
Reference in New Issue
Block a user