Onstart sync progressbar: fix potential bug with spinner on interrupt synchronization

This commit is contained in:
HDDen committed 2026-05-26 00:37:42 +03:00
1 parent 4dd472e3c3
commit 2328848400
2 files changed
+13 -3

No files matched your search

+4 -3
View File
@@ -155,12 +155,13 @@ class _ChannelsScreenState extends State<ChannelsScreen>
},
child: () {
final channels = connector.channels;
final waitingForInitialChannels =
!connector.hasLoadedChannels && !connector.isLoadingChannels;
final waitingForFirstChannel =
connector.isLoadingChannels && channels.isEmpty;
if (waitingForInitialChannels || waitingForFirstChannel) {
// Only block the list while the first channel is actively loading.
// If the initial sync aborts, show cached/partial channels instead
// of trapping the user behind an idle spinner.
if (waitingForFirstChannel) {
return const Center(child: CircularProgressIndicator());
}