fix: duplicate getting screen orientation

This commit is contained in:
lilong.129
2024-12-08 12:42:50 +08:00
parent aaf36c28ac
commit b3db26f6f9
7 changed files with 56 additions and 72 deletions

View File

@@ -244,6 +244,10 @@ type Size struct {
Height int `json:"height"`
}
func (s Size) IsNil() bool {
return s.Width == 0 && s.Height == 0
}
type Screen struct {
StatusBarSize Size `json:"statusBarSize"`
Scale float64 `json:"scale"`