fix(devices): Update refreshing state for Devices page #398

Merged
NaiJi merged 3 commits from device-screen-updating into master 2023-12-03 20:09:19 +02:00
2 changed files with 7 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class ApiDevicesCubit
}
Future<void> refresh() async {
emit(const ApiDevicesState([], LoadingStatus.refreshing));
emit(ApiDevicesState([state.thisDevice], LoadingStatus.refreshing));
_refetch();
}

View File

@ -91,6 +91,12 @@ class _DevicesInfo extends StatelessWidget {
color: Theme.of(context).colorScheme.secondary,
),
),
if (devicesStatus.status == LoadingStatus.refreshing) ...[
const Center(
heightFactor: 4,
child: CircularProgressIndicator(),
),
],
...devicesStatus.otherDevices
.map((final device) => _DeviceTile(device: device)),
],