2929 colors ,
3030 icons ,
3131)
32- from flet_core .buttons import CountinuosRectangleBorder
32+ from flet_core .buttons import ContinuousRectangleBorder
3333from loguru import logger
3434from styles import Markdown , Text
3535from utils import (
@@ -90,7 +90,7 @@ def init_visuals(
9090 TextButton ("Close" , on_click = self .close_close_explain_images_dlg ),
9191 ],
9292 actions_alignment = "end" ,
93- shape = CountinuosRectangleBorder (radius = 0 ),
93+ shape = ContinuousRectangleBorder (radius = 0 ),
9494 )
9595
9696 # initialize file pickers
@@ -129,12 +129,7 @@ def init_visuals(
129129 self .on_confirm , "Continue without additional images"
130130 )
131131 self .continue_eitherway_button .disabled = True
132- self .pick_recovery_dialog .on_result = self .enable_button_if_ready
133- self .pick_image_dialog .on_result = self .enable_button_if_ready
134- self .pick_dtbo_dialog .on_result = self .enable_button_if_ready
135- self .pick_vbmeta_dialog .on_result = self .enable_button_if_ready
136- self .pick_super_empty_dialog .on_result = self .enable_button_if_ready
137- self .pick_vendor_boot_dialog .on_result = self .enable_button_if_ready
132+
138133 # back button
139134 self .back_button = ElevatedButton (
140135 "Back" ,
@@ -245,7 +240,7 @@ def build(self):
245240 Text ("Select an OS image:" , style = "titleSmall" ),
246241 Markdown (
247242 f"""
248- The image file should look something like `lineage-20.0-20240101 -nightly-{ self .state .config .device_code } -signed.zip`."""
243+ The image file should look something like `lineage-22.1-20241101 -nightly-{ self .state .config .device_code } -signed.zip`."""
249244 ),
250245 Row (
251246 [
@@ -271,7 +266,7 @@ def build(self):
271266 Text ("Select a TWRP recovery image:" , style = "titleSmall" ),
272267 Markdown (
273268 f"""
274- The recovery image should look something like `twrp-3.7.0_12 -0-{ self .state .config .device_code } .img`.
269+ The recovery image should look something like `twrp-3.7.1_12 -0-{ self .state .config .device_code } .img`.
275270
276271**Note:** This tool **only supports TWRP recoveries**.""" ,
277272 extension_set = "gitHubFlavored" ,
@@ -375,7 +370,7 @@ def toggle_additional_image_selection(self):
375370 ),
376371 ],
377372 actions_alignment = "end" ,
378- shape = CountinuosRectangleBorder (radius = 0 ),
373+ shape = ContinuousRectangleBorder (radius = 0 ),
379374 )
380375
381376 # create help/info button to show the help dialog for the image and recovery selection
@@ -520,6 +515,7 @@ def close_close_explain_additional_images_dlg(self, e):
520515 self .page .update ()
521516
522517 def pick_image_result (self , e : FilePickerResultEvent ):
518+ logger .info (f"Selected image: { e .files } " )
523519 path = ", " .join (map (lambda f : f .name , e .files )) if e .files else "Cancelled!"
524520 # update the textfield with the name of the file
525521 self .selected_image .value = (
@@ -555,6 +551,7 @@ def pick_image_result(self, e: FilePickerResultEvent):
555551 self .additional_image_selection .controls = []
556552 self .additional_image_selection .update ()
557553 # update
554+ self .enable_button_if_ready (None )
558555 self .selected_image .update ()
559556
560557 def pick_recovery_result (self , e : FilePickerResultEvent ):
@@ -583,6 +580,7 @@ def pick_recovery_result(self, e: FilePickerResultEvent):
583580 self .selected_recovery .color = colors .RED
584581 self .selected_recovery .value += f"\n > { self .recovery_compatibility .message } "
585582 # update
583+ self .enable_button_if_ready (None )
586584 self .selected_recovery .update ()
587585
588586 def pick_dtbo_result (self , e : FilePickerResultEvent ):
@@ -600,6 +598,7 @@ def pick_dtbo_result(self, e: FilePickerResultEvent):
600598 else :
601599 logger .info ("No image selected." )
602600 # update
601+ self .enable_button_if_ready (None )
603602 self .selected_dtbo .update ()
604603
605604 def pick_vbmeta_result (self , e : FilePickerResultEvent ):
@@ -617,6 +616,7 @@ def pick_vbmeta_result(self, e: FilePickerResultEvent):
617616 else :
618617 logger .info ("No image selected." )
619618 # update
619+ self .enable_button_if_ready (None )
620620 self .selected_vbmeta .update ()
621621
622622 def pick_super_empty_result (self , e : FilePickerResultEvent ):
@@ -635,6 +635,7 @@ def pick_super_empty_result(self, e: FilePickerResultEvent):
635635 else :
636636 logger .info ("No image selected." )
637637 # update
638+ self .enable_button_if_ready (None )
638639 self .selected_super_empty .update ()
639640
640641 def pick_vendor_boot_result (self , e : FilePickerResultEvent ):
@@ -655,6 +656,7 @@ def pick_vendor_boot_result(self, e: FilePickerResultEvent):
655656 else :
656657 logger .info ("No image selected." )
657658 # update
659+ self .enable_button_if_ready (None )
658660 self .selected_vendor_boot .update ()
659661
660662 def enable_button_if_ready (self , e ):
0 commit comments