mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 17:39:42 +00:00
refactor: Remove usesBinds from ApiServerVolumeCubit
This commit is contained in:
parent
bdd00683cd
commit
9bfaf5d381
|
@ -35,7 +35,6 @@ class ApiServerVolumeCubit
|
||||||
ApiServerVolumeState(
|
ApiServerVolumeState(
|
||||||
this.state._volumes,
|
this.state._volumes,
|
||||||
this.state.status,
|
this.state.status,
|
||||||
this.state.usesBinds,
|
|
||||||
DiskStatus.fromVolumes(this.state._volumes, state.volumes),
|
DiskStatus.fromVolumes(this.state._volumes, state.volumes),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -44,7 +43,6 @@ class ApiServerVolumeCubit
|
||||||
|
|
||||||
Future<void> reload() async {
|
Future<void> reload() async {
|
||||||
final volumes = await serverApi.getServerDiskVolumes();
|
final volumes = await serverApi.getServerDiskVolumes();
|
||||||
final usesBinds = await serverApi.isUsingBinds();
|
|
||||||
var status = LoadingStatus.error;
|
var status = LoadingStatus.error;
|
||||||
|
|
||||||
if (volumes.isNotEmpty) {
|
if (volumes.isNotEmpty) {
|
||||||
|
@ -55,7 +53,6 @@ class ApiServerVolumeCubit
|
||||||
ApiServerVolumeState(
|
ApiServerVolumeState(
|
||||||
volumes,
|
volumes,
|
||||||
status,
|
status,
|
||||||
usesBinds,
|
|
||||||
DiskStatus.fromVolumes(
|
DiskStatus.fromVolumes(
|
||||||
volumes,
|
volumes,
|
||||||
providerVolumeCubit.state.volumes,
|
providerVolumeCubit.state.volumes,
|
||||||
|
|
|
@ -4,16 +4,14 @@ class ApiServerVolumeState extends ServerInstallationDependendState {
|
||||||
const ApiServerVolumeState(
|
const ApiServerVolumeState(
|
||||||
this._volumes,
|
this._volumes,
|
||||||
this.status,
|
this.status,
|
||||||
this.usesBinds,
|
|
||||||
this._diskStatus,
|
this._diskStatus,
|
||||||
);
|
);
|
||||||
|
|
||||||
ApiServerVolumeState.initial()
|
ApiServerVolumeState.initial()
|
||||||
: this(const [], LoadingStatus.uninitialized, null, DiskStatus());
|
: this(const [], LoadingStatus.uninitialized, DiskStatus());
|
||||||
|
|
||||||
final List<ServerDiskVolume> _volumes;
|
final List<ServerDiskVolume> _volumes;
|
||||||
final DiskStatus _diskStatus;
|
final DiskStatus _diskStatus;
|
||||||
final bool? usesBinds;
|
|
||||||
final LoadingStatus status;
|
final LoadingStatus status;
|
||||||
|
|
||||||
List<DiskVolume> get volumes => _diskStatus.diskVolumes;
|
List<DiskVolume> get volumes => _diskStatus.diskVolumes;
|
||||||
|
@ -27,16 +25,14 @@ class ApiServerVolumeState extends ServerInstallationDependendState {
|
||||||
ApiServerVolumeState copyWith({
|
ApiServerVolumeState copyWith({
|
||||||
final List<ServerDiskVolume>? volumes,
|
final List<ServerDiskVolume>? volumes,
|
||||||
final LoadingStatus? status,
|
final LoadingStatus? status,
|
||||||
final bool? usesBinds,
|
|
||||||
final DiskStatus? diskStatus,
|
final DiskStatus? diskStatus,
|
||||||
}) =>
|
}) =>
|
||||||
ApiServerVolumeState(
|
ApiServerVolumeState(
|
||||||
volumes ?? _volumes,
|
volumes ?? _volumes,
|
||||||
status ?? this.status,
|
status ?? this.status,
|
||||||
usesBinds ?? this.usesBinds,
|
|
||||||
diskStatus ?? _diskStatus,
|
diskStatus ?? _diskStatus,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object?> get props => [_volumes, status, usesBinds];
|
List<Object?> get props => [_volumes, status];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue