You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/07/23 08:49:40 UTC

[GitHub] [cordova-plugin-inappbrowser] kamekazemaster commented on issue #321: Keep status bar color when browser popup

kamekazemaster commented on issue #321: Keep status bar color when browser popup
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/321#issuecomment-514116550
 
 
   For now a quiet dirty quickfix is to set the statusbar styles on `exit` of the InAppBrowser:
   
   `const exitSubscription = iab.on('exit').subscribe(() => {
         let counter = 1;
         const intervalId = setInterval(() => {
           if (counter < 20) {
             this.statusBar.styleLightContent();
             counter++;
           } else {
             clearInterval(intervalId);
             exitSubscription.unsubscribe();
           }
         }, 100);
       });`
   
   I am setting the style multiple times because somehow the app does not recognize any stylings to the statusBar via the plugin's methods for some time (this time differs on different devices). Maybe the Ionic context is not ready yet.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org