Skip to content

Commit

Permalink
remove StatusBar plugin
Browse files Browse the repository at this point in the history
I attempted to unify the appearance of the statusbar between platforms by adding the StatusBar plugin (which had already been referenced in the code).
However, this caused major issues on some Android devices with the entire appbar no longer being visible.
This was not a high priority; rather than spend a lot of time trying to get the right appearance, I am just going to revert it for now
  • Loading branch information
JGreenlee committed Sep 25, 2024
1 parent b08a669 commit d89cf5a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions package.cordovabuild.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@
},
"cordova-plugin-bluetooth-classic-serial-port": {},
"cordova-custom-config": {},
"com.unarin.cordova.beacon": {},
"cordova-plugin-statusbar": {}
"com.unarin.cordova.beacon": {}
}
},
"dependencies": {
Expand Down Expand Up @@ -137,7 +136,6 @@
"cordova-plugin-bluetooth-classic-serial-port": "git+https://github.com/e-mission/cordova-plugin-bluetooth-classic-serial-port.git",
"cordova-custom-config": "^5.1.1",
"com.unarin.cordova.beacon": "github:e-mission/cordova-plugin-ibeacon",
"cordova-plugin-statusbar": "^4.0.0",
"core-js": "^2.5.7",
"e-mission-common": "github:JGreenlee/e-mission-common#semver:0.6.1",
"enketo-core": "^6.1.7",
Expand Down
2 changes: 1 addition & 1 deletion setup/setup_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ sed -i -e "s|/usr/bin/env node|/usr/bin/env node --unhandled-rejections=strict|"

npx cordova prepare$PLATFORMS

EXPECTED_COUNT=26
EXPECTED_COUNT=25
INSTALLED_COUNT=`npx cordova plugin list | wc -l`
echo "Found $INSTALLED_COUNT plugins, expected $EXPECTED_COUNT"
if [ $INSTALLED_COUNT -lt $EXPECTED_COUNT ];
Expand Down
2 changes: 1 addition & 1 deletion www/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ window.skipLocalNotificationReady = true;
deviceReady.then(() => {
logDebug('deviceReady');
// On init, use 'default' status bar (black text)
window['StatusBar']?.styleDefault();
// window['StatusBar']?.styleDefault();
cordova.plugin.http.setDataSerializer('json');
const rootEl = document.getElementById('appRoot');
const reactRoot = createRoot(rootEl);
Expand Down
4 changes: 2 additions & 2 deletions www/js/onboarding/OnboardingStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ const OnboardingStack = () => {

if (onboardingState.route == OnboardingRoute.WELCOME) {
// This page needs 'light content' status bar (white text) due to blue header at the top
window['StatusBar']?.styleLightContent();
// window['StatusBar']?.styleLightContent();
return <WelcomePage />;
}
// All other pages go back to 'default' (black text)
window['StatusBar']?.styleDefault();
// window['StatusBar']?.styleDefault();
if (onboardingState.route == OnboardingRoute.SUMMARY) {
return <SummaryPage />;
} else if (onboardingState.route == OnboardingRoute.PROTOCOL) {
Expand Down

0 comments on commit d89cf5a

Please sign in to comment.