add setting to auto clear unassigned tabs after duration

This commit is contained in:
Fabian Freund committed 2026-01-14 06:02:12 +01:00
1 parent 53df72d906
commit aa2123d636
10 files changed
+139 -4

No files matched your search

@@ -387,4 +387,15 @@ class TabDao extends DatabaseAccessor<TabDatabase> with $TabDaoMixin {
);
}
}
Future<List<String>> getUnassignedTabsOlderThan(DateTime threshold) {
final query = selectOnly(db.tab)
..addColumns([db.tab.id])
..where(
db.tab.containerId.isNull() &
db.tab.timestamp.isSmallerThanValue(threshold),
);
return query.map((row) => row.read(db.tab.id)!).get();
}
}