fix stale

This commit is contained in:
Fabian Freund
2026-03-23 15:25:10 +01:00
parent 053d4861df
commit 36c3ca32b3
@@ -165,6 +165,17 @@ class SmallWebSessionController extends _$SmallWebSessionController {
});
if (persistFuture.future != null) {
unawaited(
persistFuture.future!.whenComplete(() {
//When nothing got decoded dont stay stale
if (stateOrNull == null || state.isLoading) {
state = AsyncData(
SmallWebSessionState.initial(SmallWebSourceKind.kagi),
);
}
}),
);
return const AsyncLoading();
}