Home / IOS Development / android – Ionic v3: Toggle Hide / Unhide Passwords only work after round progress is completed

android – Ionic v3: Toggle Hide / Unhide Passwords only work after round progress is completed



I got an app that works like a 2FA, and I got a problem with the iOS platform.

  • When I change hide / show password, the ng container does not change until after the countdown for round progress is completed (30 sec) and gets the next password from the database.

The problem is that this problem is only on iOS. On Android ng-container changes to each shift state, after saving and closing the configuration page. So with the same code, on iOS I have to wait for the counter to quit and load the next password, after you have changed / hide the password.

[list.html]

 
     

--- ---

{{cod.title}}

{{cod.password}}

{{cod.title}}

[list.ts]

presentPopover(myEvent) {
    let popover = this.popoverCtrl.create(PopoverComponent);
    popover.present({
      ev: myEvent
    });

    popover.onDidDismiss(data => {
      this.getHidePassword();
      this.changeClockColor();

      setTimeout(() =>{
        for(let item of this.passwords){
          item["hide"] = this.hidePassword;
        }
      }, 200);
    });
  }

[config.html]


[config.ts]

toggleChange($event){
    var check = 0;

    if($event.checked){
      check = 1;
    }

    this.database.setDataHide("hidePassword", check).then(() => {        
      console.log("Saved!");
    }).catch(e => console.log(e)); 
  }

Any suggestions on how to make the iOS version work like the Android version? Or what should I check.

  • To hide / hide ng-container (password) every time I change hide / show the screen switch in the configuration page. Do not wait until the counter finishes (and get the next password from the database).

I opened a thread in the Ionic Forum, but no suggestion until now.

Thanks in advance.


Source link