Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
git-elliot committed Nov 18, 2024
1 parent 06b88a1 commit ed7f827
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ class HostScanBloc extends Bloc<HostScanEvent, HostScanState> {
devicesSet.clear();
mDnsDevices.clear();
emit(const HostScanState.loadInProgress());
await initializeWifiParameters(emit);
if (appSettings.runScanOnStartup) {
add(const HostScanEvent.loadScan());
} else {
add(const HostScanEvent.startNewScan());
}
}

Future<void> initializeWifiParameters(Emitter<HostScanState> emit) async {
String? wifiGatewayIP;
try {
wifiGatewayIP = await NetworkInfo().getWifiGatewayIP();
Expand All @@ -79,6 +70,11 @@ class HostScanBloc extends Bloc<HostScanEvent, HostScanState> {
return;
}
subnet = gatewayIp!.substring(0, gatewayIp!.lastIndexOf('.'));
if (appSettings.runScanOnStartup) {
add(const HostScanEvent.loadScan());
} else {
add(const HostScanEvent.startNewScan());
}
}

Future<void> _startNewScanBuiltInIsolate(
Expand Down

0 comments on commit ed7f827

Please sign in to comment.