Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove wifi speed test campus network requirement for #1856 #1857

Merged
merged 2 commits into from
Nov 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions lib/core/services/speed_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,15 @@ class SpeedTestService {
}

Future<WifiInfo?> fetchNetworkDiagnostics() async {

_isLoading = true;
// Check connected to wifi
if (await _connectivity.checkConnectivity() != ConnectivityResult.wifi) {
_isLoading = false;
return null;
}
late bool isUCSDWIFI;
// Check for UCSD wifi
WifiInfo? wiFiInfo = await WifiConnection.wifiInfo.then((value) {
if ((!value.ssid!.contains("UCSD-PROTECTED")) &&
(!value.ssid!.contains("UCSD-GUEST")) &&
(!value.ssid!.contains("ResNet"))) {
isUCSDWIFI = false;
_isLoading = false;
return null;
}
_isLoading = false;
isUCSDWIFI = true;
return value;
});

if (!isUCSDWIFI) {
_isLoading = false;
return null;
}

// Check wifi info
WifiInfo? wiFiInfo = await WifiConnection.wifiInfo.then((value) => value);
return wiFiInfo;
}

Expand Down