Merge pull request 'fix(devices): Update refreshing state for Devices page' (#398) from device-screen-updating into master
continuous-integration/drone/push Build is passing Details

Reviewed-on: #398
Reviewed-by: Inex Code <inex.code@selfprivacy.org>
pull/393/head^2
NaiJi ✨ 2023-12-03 20:09:18 +02:00
commit 5d92c95ce0
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)),
],