mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 09:31:13 +00:00
Merge pull request 'fix(devices): Update refreshing state for Devices page' (#398) from device-screen-updating into master
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/398 Reviewed-by: Inex Code <inex.code@selfprivacy.org>
This commit is contained in:
commit
5d92c95ce0
|
@ -21,7 +21,7 @@ class ApiDevicesCubit
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> refresh() async {
|
Future<void> refresh() async {
|
||||||
emit(const ApiDevicesState([], LoadingStatus.refreshing));
|
emit(ApiDevicesState([state.thisDevice], LoadingStatus.refreshing));
|
||||||
_refetch();
|
_refetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,12 @@ class _DevicesInfo extends StatelessWidget {
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (devicesStatus.status == LoadingStatus.refreshing) ...[
|
||||||
|
const Center(
|
||||||
|
heightFactor: 4,
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
),
|
||||||
|
],
|
||||||
...devicesStatus.otherDevices
|
...devicesStatus.otherDevices
|
||||||
.map((final device) => _DeviceTile(device: device)),
|
.map((final device) => _DeviceTile(device: device)),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue