mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 16:08:52 +01:00
bug fix
This commit is contained in:
parent
76e3da8be7
commit
f93a4efce1
@ -80,9 +80,10 @@ func (self *RomSoConfirmPage) KeyDown(ev *event.Event) {
|
||||
}
|
||||
|
||||
if ev.Data["Key"] == UI.CurKeys["B"] {
|
||||
if UI.CheckBattery < 5 {
|
||||
bat := UI.CheckBattery()
|
||||
if bat < 5 && bat >= 0 {
|
||||
self.SnapMsg("Battery must over 5%")
|
||||
}else {
|
||||
}else { // -1 or something else,
|
||||
if self.DownloadPage == nil {
|
||||
self.DownloadPage = UI.NewDownloadProcessPage()
|
||||
self.DownloadPage.Screen = self.Screen
|
||||
|
||||
@ -215,8 +215,8 @@ func GetUid(path string) int {
|
||||
}
|
||||
|
||||
func CheckBattery() int {
|
||||
if UI.FileExists(sysgo.Battery) == false {
|
||||
return
|
||||
if FileExists(sysgo.Battery) == false {
|
||||
return -1
|
||||
}
|
||||
batinfos,err := ReadLines(sysgo.Battery)
|
||||
if err == nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user