fix isolated tab handling
This commit is contained in:
@@ -525,12 +525,13 @@ class TabDao extends DatabaseAccessor<TabDatabase> with $TabDaoMixin {
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<String>> getUnassignedTabsOlderThan(DateTime threshold) {
|
||||
Future<List<String>> getUnassignedRegularTabsOlderThan(DateTime threshold) {
|
||||
final query = selectOnly(db.tab)
|
||||
..addColumns([db.tab.id])
|
||||
..where(
|
||||
db.tab.containerId.isNull() &
|
||||
db.tab.timestamp.isSmallerThanValue(threshold),
|
||||
db.tab.timestamp.isSmallerThanValue(threshold) &
|
||||
db.tab.tabMode.equalsValue(TabModeDbValue.regular),
|
||||
);
|
||||
|
||||
return query.map((row) => row.read(db.tab.id)!).get();
|
||||
|
||||
@@ -277,7 +277,7 @@ class TabDataRepository extends _$TabDataRepository {
|
||||
final tabIds = await ref
|
||||
.read(tabDatabaseProvider)
|
||||
.tabDao
|
||||
.getUnassignedTabsOlderThan(threshold);
|
||||
.getUnassignedRegularTabsOlderThan(threshold);
|
||||
|
||||
if (tabIds.isNotEmpty) {
|
||||
await ref.read(tabRepositoryProvider.notifier).closeTabs(tabIds);
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ Future<bool?> showQuitBrowserDialog(BuildContext context) {
|
||||
icon: const Icon(Icons.warning),
|
||||
title: const Text('Quit Browser'),
|
||||
content: const Text(
|
||||
'This will properly shutdown the browser and clear private tabs',
|
||||
'This will properly shutdown the browser and clear private tab data',
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ Future<bool?> showSwitchProfileDialog(
|
||||
icon: const Icon(Icons.warning),
|
||||
title: const Text('Switch User'),
|
||||
content: Text(
|
||||
"Switching to User '$profileName' will require a restart of the Browser.",
|
||||
"Switching to User '$profileName' will require a restart of the Browser.\n\nPrivate tab data will be cleared on restart.",
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
actions: [
|
||||
|
||||
Reference in New Issue
Block a user