From b7018b9de820059e236f849a47b124a06427431b Mon Sep 17 00:00:00 2001 From: Justin Do Date: Thu, 24 Oct 2024 16:51:45 +0700 Subject: [PATCH] update handle back button on android (#695) * update handle back button on androidf * fix app not reload after tap back button --- ui/window.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/window.go b/ui/window.go index 89da18873..3361da465 100644 --- a/ui/window.go +++ b/ui/window.go @@ -414,9 +414,9 @@ func (win *Window) listenSoftKey(gtx C) { // check for presses of the back key. if runtime.GOOS == "android" { for { - event, ok := gtx.Event(key.FocusFilter{Target: win}, - key.Filter{Focus: win, Name: key.NameBack}, - ) + event, ok := gtx.Event(key.Filter{ + Name: key.NameBack, + }) if !ok { break } @@ -425,6 +425,7 @@ func (win *Window) listenSoftKey(gtx C) { case key.Event: if event.Name == key.NameBack && event.State == key.Press { win.load.Theme.OnTapBack() + win.navigator.Reload() } } }