use fire immediatialy

This commit is contained in:
Fabian Freund
2025-06-15 21:27:41 +02:00
parent 81ecb69cce
commit 9b7286ffd4
6 changed files with 67 additions and 31 deletions
@@ -244,7 +244,10 @@ class TabRepository extends _$TabRepository {
);
});
ref.listen(selectedTabProvider, (previous, tabId) async {
ref.listen(fireImmediately: true, selectedTabProvider, (
previous,
tabId,
) async {
if (tabId != null) {
_previousTabId = previous;
await db.tabDao.touchTab(tabId, timestamp: DateTime.now());