Skip to content

Commit

Permalink
Simplify the variables used
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Apr 8, 2024
1 parent 2c5b18a commit 3bf448a
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions internal/driver/mobile/app/android.go
Expand Up @@ -76,7 +76,6 @@ import (
var mimeMap = map[string]string{
".txt": "text/plain",
}
var currentSize size.Event

// GoBack asks the OS to go to the previous app / activity
func GoBack() {
Expand Down Expand Up @@ -292,8 +291,8 @@ var (
windowConfigChange = make(chan windowConfig)
activityDestroyed = make(chan struct{})

screenInsetTop, screenInsetBottom, screenInsetLeft, screenInsetRight int
darkMode bool
currentSize size.Event
darkMode bool
)

func init() {
Expand Down Expand Up @@ -355,12 +354,10 @@ func filePickerReturned(str *C.char) {

//export insetsChanged
func insetsChanged(top, bottom, left, right int) {
screenInsetTop, screenInsetBottom, screenInsetLeft, screenInsetRight = top, bottom, left, right

currentSize.InsetTopPx = screenInsetTop
currentSize.InsetBottomPx = screenInsetBottom
currentSize.InsetLeftPx = screenInsetLeft
currentSize.InsetRightPx = screenInsetRight
currentSize.InsetTopPx = top
currentSize.InsetBottomPx = bottom
currentSize.InsetLeftPx = left
currentSize.InsetRightPx = right

theApp.events.In() <- currentSize
}
Expand Down

0 comments on commit 3bf448a

Please sign in to comment.