add required select parameter
This commit is contained in:
@@ -140,7 +140,7 @@ class TabRepository extends _$TabRepository {
|
||||
Future<String> duplicateTab({
|
||||
required String selectTabId,
|
||||
required String? containerId,
|
||||
bool selectTab = false,
|
||||
required bool selectTab,
|
||||
}) async {
|
||||
final tabDao = ref.read(tabDatabaseProvider).tabDao;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ final class TabRepositoryProvider
|
||||
}
|
||||
}
|
||||
|
||||
String _$tabRepositoryHash() => r'7faec6d906e44b679d6fd67ad5e722f5d01cff0a';
|
||||
String _$tabRepositoryHash() => r'ea1079570ed2c3424fef6168a7633a10cfb9ac6a';
|
||||
|
||||
abstract class _$TabRepository extends $Notifier<void> {
|
||||
void build();
|
||||
|
||||
@@ -209,6 +209,7 @@ class TabMenu extends HookConsumerWidget {
|
||||
.duplicateTab(
|
||||
selectTabId: selectedTabId,
|
||||
containerId: tabState.contextId,
|
||||
selectTab: false,
|
||||
);
|
||||
|
||||
if (context.mounted) {
|
||||
@@ -243,6 +244,7 @@ class TabMenu extends HookConsumerWidget {
|
||||
.duplicateTab(
|
||||
selectTabId: selectedTabId,
|
||||
containerId: tabState.contextId,
|
||||
selectTab: false,
|
||||
);
|
||||
|
||||
if (context.mounted) {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:nullability/nullability.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:weblibre/features/geckoview/domain/providers/selected_tab.dart';
|
||||
import 'package:weblibre/features/geckoview/domain/providers/tab_state.dart';
|
||||
import 'package:weblibre/features/geckoview/domain/repositories/tab.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/database/definitions.drift.dart';
|
||||
@@ -37,6 +38,7 @@ class TabDataRepository extends _$TabDataRepository {
|
||||
bool closeOldTab = true,
|
||||
}) async {
|
||||
final currentContainerId = await getTabContainerId(tabId);
|
||||
final selectedTabId = ref.read(selectedTabProvider);
|
||||
|
||||
final currentContainerData = await currentContainerId.mapNotNull(
|
||||
(containerId) => ref
|
||||
@@ -64,7 +66,7 @@ class TabDataRepository extends _$TabDataRepository {
|
||||
private: tabState.isPrivate,
|
||||
container: Value(targetContainer),
|
||||
parentId: tabState.parentId,
|
||||
selectTab: false,
|
||||
selectTab: selectedTabId == tabState.id,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -72,6 +74,7 @@ class TabDataRepository extends _$TabDataRepository {
|
||||
|
||||
Future<void> unassignContainer(String tabId) async {
|
||||
final currentContainerId = await getTabContainerId(tabId);
|
||||
final selectedTabId = ref.read(selectedTabProvider);
|
||||
|
||||
final currentContainerData = await currentContainerId.mapNotNull(
|
||||
(containerId) => ref
|
||||
@@ -96,7 +99,7 @@ class TabDataRepository extends _$TabDataRepository {
|
||||
private: tabState.isPrivate,
|
||||
container: const Value(null),
|
||||
parentId: tabState.parentId,
|
||||
selectTab: false,
|
||||
selectTab: selectedTabId == tabState.id,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ final class TabDataRepositoryProvider
|
||||
}
|
||||
}
|
||||
|
||||
String _$tabDataRepositoryHash() => r'2c2ba950834fac4be9ef6c7042e6ed5a76577b1c';
|
||||
String _$tabDataRepositoryHash() => r'e6d8f328368e7525bdd970d8cb3fdea6f0f03a85';
|
||||
|
||||
abstract class _$TabDataRepository extends $Notifier<void> {
|
||||
void build();
|
||||
|
||||
Reference in New Issue
Block a user