mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-05-23 22:37:41 +08:00
修复主题背景覆盖不全的问题
This commit is contained in:
parent
a53f7aa37f
commit
fd7c86d687
@ -1,3 +1,7 @@
|
||||
### 优化
|
||||
|
||||
- 添加是否忽略电池优化检查,用于提醒用户添加白名单,确保APP后台播放稳定性
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复主题背景覆盖不全的问题
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Dimensions } from 'react-native'
|
||||
import { Dimensions, StatusBar } from 'react-native'
|
||||
import { getWindowSize } from './nativeModules/utils'
|
||||
|
||||
export type SizeHandler = (size: { width: number, height: number }) => void
|
||||
@ -24,7 +24,7 @@ export const windowSizeTools = {
|
||||
if (!size.width) return
|
||||
const scale = Dimensions.get('screen').scale
|
||||
size.width = Math.trunc(size.width / scale)
|
||||
size.height = Math.trunc(size.height / scale)
|
||||
size.height = Math.trunc(size.height / scale) + (StatusBar.currentHeight ?? 0)
|
||||
this.size = size
|
||||
for (const handler of this.listeners) handler(size)
|
||||
})
|
||||
@ -33,7 +33,7 @@ export const windowSizeTools = {
|
||||
if (size.width) {
|
||||
const scale = Dimensions.get('screen').scale
|
||||
size.width = Math.trunc(size.width / scale)
|
||||
size.height = Math.trunc(size.height / scale)
|
||||
size.height = Math.trunc(size.height / scale) + (StatusBar.currentHeight ?? 0)
|
||||
this.size = size
|
||||
} else {
|
||||
const window = Dimensions.get('window')
|
||||
@ -42,7 +42,7 @@ export const windowSizeTools = {
|
||||
height: window.height,
|
||||
}
|
||||
}
|
||||
console.log('init windowSizeTools')
|
||||
// console.log('init windowSizeTools')
|
||||
return size
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user