File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
apps/com.lightningpiggy.displaywallet/assets Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,10 @@ def keyboard_value_changed_cb_unused(self, event):
104104 def open_edit_popup (self , setting ):
105105 # Close existing msgbox and keyboard if open
106106 if self .msgbox :
107- self .msgbox .delete ()
107+ try :
108+ self .msgbox .delete ()
109+ except Exception as e :
110+ print (f"Warning: could not delete msgbox: { e } " )
108111 self .msgbox = None
109112 if self .keyboard :
110113 self .keyboard .add_flag (lv .obj .FLAG .HIDDEN )
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ def swipe_read_cb(indev_drv, data):
6969 mpos .ui .open_drawer ()
7070 start_y = None # Reset Y after swipe
7171 start_x = None # Reset X to avoid conflicts
72+ else :
73+ # Mouse/touch released
74+ if start_y is not None and y < start_y - 50 : # Threshold for swipe-up
75+ print ("Swipe Up Detected" )
76+ mpos .ui .close_drawer ()
77+
7278 # Check for rightward swipe from left edge (x increased significantly)
7379 if start_x is not None and x > start_x + 50 : # Threshold for swipe right
7480 print ("Long swipe right" )
@@ -77,11 +83,6 @@ def swipe_read_cb(indev_drv, data):
7783 mpos .ui .back_screen () # Call custom method for left menu
7884 start_y = None # Reset Y after swipe
7985 start_x = None # Reset X after swipe
80- else :
81- # Mouse/touch released
82- if start_y is not None and y < start_y - 50 : # Threshold for swipe-up
83- print ("Swipe Up Detected" )
84- mpos .ui .close_drawer ()
8586
8687 # Reset both coordinates on release
8788 start_y = None
You can’t perform that action at this time.
0 commit comments