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
continuous-integration/drone/push Build is passing
Details
Reviewed-on: #398 Reviewed-by: Inex Code <inex.code@selfprivacy.org>pull/393/head^2
commit
5d92c95ce0
|
@ -21,7 +21,7 @@ class ApiDevicesCubit
|
|||
}
|
||||
|
||||
Future<void> refresh() async {
|
||||
emit(const ApiDevicesState([], LoadingStatus.refreshing));
|
||||
emit(ApiDevicesState([state.thisDevice], LoadingStatus.refreshing));
|
||||
_refetch();
|
||||
}
|
||||
|
||||
|
|
|
@ -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)),
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue