From df47d4d2ed5491225bca9120624379d0603c51e9 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 18 Feb 2021 12:59:55 +0300 Subject: [PATCH] fixed wifi issues --- .../authentication/authentication.service.ts | 2 +- .../attendance-options.component.ts | 2 -- .../home/wifi-model/wifi-modal.component.ts | 12 ++++++---- .../src/app/profile/home/home.component.html | 3 ++- .../src/app/profile/home/home.component.scss | 22 ++++++------------- Mohem/src/assets/imgs/edit-image.svg | 14 ++++++++++++ WifiWizard2.java | 2 +- 7 files changed, 33 insertions(+), 24 deletions(-) create mode 100644 Mohem/src/assets/imgs/edit-image.svg diff --git a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts index 6c277e62..74819bf6 100644 --- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts +++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts @@ -133,7 +133,7 @@ export class AuthenticationService { }else{ mobileType = 'android'; } - request.VersionID = 2.6; + request.VersionID = 2.7; request.Channel = 31; request.LanguageID = TranslatorService.getCurrentLanguageCode(); request.MobileType = mobileType; diff --git a/Mohem/src/app/home/attendance-options/attendance-options.component.ts b/Mohem/src/app/home/attendance-options/attendance-options.component.ts index d17f3521..f655dcb9 100644 --- a/Mohem/src/app/home/attendance-options/attendance-options.component.ts +++ b/Mohem/src/app/home/attendance-options/attendance-options.component.ts @@ -109,8 +109,6 @@ export class AttendanceOptionsComponent implements OnInit { servicePrivilage.ServiceName === "enableWIFI" ) { this.serviceEnableWifi = true; - } else { - this.serviceEnableWifi = true; } } } diff --git a/Mohem/src/app/home/wifi-model/wifi-modal.component.ts b/Mohem/src/app/home/wifi-model/wifi-modal.component.ts index abc86a16..208682cf 100644 --- a/Mohem/src/app/home/wifi-model/wifi-modal.component.ts +++ b/Mohem/src/app/home/wifi-model/wifi-modal.component.ts @@ -170,11 +170,15 @@ export class WifiModalComponent implements OnInit { } async isWifiAvailable(ssid:string){ - let avaialble_wifi = await this.wifiWizard2.scan(); - let find_ = avaialble_wifi.find(element => { + let avaialble_wifi = await this.wifiWizard2.scan(); + let find = avaialble_wifi.find(element => { return element.SSID == ssid; }); - console.log("find: " + find_.SSID); - return find_.SSID == ssid; + + if (find === undefined) { + return false; + } else { + return find.SSID == ssid; + } } } diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index 261988e0..86ee5a08 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -20,7 +20,8 @@
diff --git a/Mohem/src/app/profile/home/home.component.scss b/Mohem/src/app/profile/home/home.component.scss index d60f3b9c..23f91321 100644 --- a/Mohem/src/app/profile/home/home.component.scss +++ b/Mohem/src/app/profile/home/home.component.scss @@ -18,21 +18,13 @@ ion-col.colBold, ion-col.colBold > label{ // background-color: #d9d7d7 !important; -.menubutton{ - white-space: normal; - color: var(--light); - text-transform: capitalize; - min-height: 39px; - background: #f0ecec; - font-size: 2rem; - position: absolute; - width: 35px !important; - height: 19px; - box-shadow: 3px 0px 7px 0px #c5c2c2; - border-radius: 50%; - - - } +.menubutton { + background: #f0ecec; + min-height: 39px; + width: 35px !important; + height: 20px; + border-radius: 50%; +} .changeIcon{ /* background: #c1c1c1; */ diff --git a/Mohem/src/assets/imgs/edit-image.svg b/Mohem/src/assets/imgs/edit-image.svg new file mode 100644 index 00000000..fc5a615a --- /dev/null +++ b/Mohem/src/assets/imgs/edit-image.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/WifiWizard2.java b/WifiWizard2.java index 39d1562f..03647d0a 100644 --- a/WifiWizard2.java +++ b/WifiWizard2.java @@ -423,7 +423,7 @@ // NetworkRequest nr = networkRequestBuilder1.build(); // //timeout add because "No devices found" wasn't handled correct and doesn't throw Unavailable -// connectivityManager.requestNetwork(nr, this.networkCallback, 20000); +// connectivityManager.requestNetwork(nr, this.networkCallback, 30000); // }else{