greybax / cordova-plugin-native-spinner

:arrows_counterclockwise: Cordova plugin for showing a native spinner based on Paldom/SpinnerDialog
MIT License
32 stars 19 forks source link

windows phone status bar should has a parameter #1

Closed greybax closed 7 years ago

greybax commented 7 years ago

The plugin assumes that the app on Windows Phone has the status bar hidden, and persists in hiding it together with the spinner. This should be fixed with a parameter to tell if the status bar should be kept or hidden, such as:

SpinnerDialog.hide(false); // hide spinner and status bar (usual behavior)
SpinnerDialog.hide(true); // hide spinner, keep status bar on

Otherwise, we have to constantly edit the plugin to prevent it from wrongly hiding the status bar.

andreszs commented 7 years ago

I've tried this on SpinnerDialogProxy.js to use the data parameter which should be the one provided by SpinnerDialog.hide(true/false)but clearly there's something wrong here:

if(typeof(data[0]) === 'undefined' || data[0] === false) { Windows.UI.ViewManagement.StatusBar.getForCurrentView().hideAsync(); }

The result is always the same, in this case the status bar remains always visible with both SpinnerDialog.hide(true) and SpinnerDialog.hide(false).

If anyone knows how to properly receive the true/false parameter, please contribute.

greybax commented 7 years ago

fixed by @andreszs

andreszs commented 6 years ago

Notice that these changes haven't been uploaded to npm, therefore an older version is still being distributed. Please commit the changes to npm so we can get the latest version directly from there, and not via a local plugin copy.