fix(mobile): mounted check before setState in album sync action (#28300)

_manualSyncAlbums fires a setState 1s after sync via Future.delayed
with no mounted check. if the widget is gone by then, setState throws
null check and the global error logger logs it severe.
This commit is contained in:
Santo Shakil
2026-05-09 00:55:03 +06:00
committed by GitHub
parent 832ed4d015
commit 7c6750941e
@@ -74,6 +74,7 @@ class _AlbumSyncActionButtonState extends ConsumerState<_AlbumSyncActionButton>
} catch (_) {
} finally {
Future.delayed(const Duration(seconds: 1), () {
if (!mounted) return;
setState(() {
isAlbumSyncInProgress = false;
});