|
@@ -51,7 +51,6 @@ let initialSettled = false
|
|
|
const settleStatusBar = async () => {
|
|
const settleStatusBar = async () => {
|
|
|
if (Capacitor.getPlatform() === 'android') {
|
|
if (Capacitor.getPlatform() === 'android') {
|
|
|
try {
|
|
try {
|
|
|
- await Capacitor.Plugins.App.getInfo() // 等待平台初始化??
|
|
|
|
|
await (new Promise((r) => setTimeout(r, initialSettled ? 300 : 500)))
|
|
await (new Promise((r) => setTimeout(r, initialSettled ? 300 : 500)))
|
|
|
if (!initialSettled) { initialSettled = true }
|
|
if (!initialSettled) { initialSettled = true }
|
|
|
await StatusBar.setStyle({ style: Style.Light }) // 可选:设置状态栏样式
|
|
await StatusBar.setStyle({ style: Style.Light }) // 可选:设置状态栏样式
|