fix lifecycle issues

This commit is contained in:
Fabian Freund
2025-09-19 12:19:16 +02:00
parent 6ab481d188
commit 8e1867092b
18 changed files with 36 additions and 23 deletions
@@ -69,6 +69,7 @@ class TabRepository extends _$TabRepository {
final assingedContainer =
container ??
Value<ContainerData?>(
// ignore: only_use_keep_alive_inside_keep_alive
await ref.read(selectedContainerProvider.notifier).fetchData(),
);
@@ -183,6 +184,7 @@ class TabRepository extends _$TabRepository {
if (containerData != null) {
if (containerData.metadata.authSettings.authenticationRequired) {
// ignore: only_use_keep_alive_inside_keep_alive
if (containerId != ref.read(selectedContainerProvider)) {
logger.w(
'Tried to open authenticated tab $tabId but container not selected',
@@ -295,6 +297,7 @@ class TabRepository extends _$TabRepository {
final db = ref.watch(tabDatabaseProvider);
final tabAddedSub = eventSerivce.tabAddedStream.listen((tabId) async {
// ignore: only_use_keep_alive_inside_keep_alive
final containerId = ref.read(selectedContainerProvider);
await db.tabDao.upsertUnassignedTab(
tabId,