Skip to content

Commit 1a87df9

Browse files
committed
Give examples on what to download
1 parent 61aae61 commit 1a87df9

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

openandroidinstaller/openandroidinstaller.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
UserControl,
4747
FloatingActionButton,
4848
VerticalDivider,
49+
Markdown,
4950
colors,
5051
icons,
5152
)
@@ -297,7 +298,7 @@ def build(self):
297298
Column(
298299
[
299300
Text(
300-
"You can download supported image and recovery file for your device here:"
301+
"You can bring your own image and recovery or you download the officially supported image and recovery file for your device here:"
301302
),
302303
Row(
303304
[
@@ -311,6 +312,13 @@ def build(self):
311312
),
312313
]
313314
),
315+
Markdown(
316+
f"""
317+
The image file should look something like `lineage-19.1-20221101-nightly-{self.state.config.metadata.get('devicecode')}-signed.zip`
318+
and the recovery like `lineage-19.1-20221101-recovery-{self.state.config.metadata.get('devicecode')}.img`
319+
or `twrp-3.6.2_9-0-{self.state.config.metadata.get('devicecode')}.img`.
320+
"""
321+
),
314322
Divider(),
315323
]
316324
)
@@ -371,7 +379,9 @@ def enable_button_if_ready(self, e):
371379
):
372380
# if image and recovery work for device allow to move on, otherwise display message
373381
self.info_field.controls = [
374-
Text("Image and recovery don't work with the device. Please select different ones.")
382+
Text(
383+
"Image and recovery don't work with the device. Please select different ones."
384+
)
375385
]
376386
self.right_view.update()
377387
return
@@ -504,8 +514,10 @@ def load_config(self, device_code: str) -> Optional[str]:
504514
return self.config.metadata.get("devicename", "No device name in config.")
505515

506516
def pick_image_result(self, e: FilePickerResultEvent):
507-
path = (", ".join(map(lambda f: f.name, e.files)) if e.files else "Cancelled!")
508-
self.selected_image.value = self.selected_image.value.split(":")[0] + f": {path}"
517+
path = ", ".join(map(lambda f: f.name, e.files)) if e.files else "Cancelled!"
518+
self.selected_image.value = (
519+
self.selected_image.value.split(":")[0] + f": {path}"
520+
)
509521
if e.files:
510522
self.image_path = e.files[0].path
511523
self.state.image_path = e.files[0].path
@@ -515,8 +527,10 @@ def pick_image_result(self, e: FilePickerResultEvent):
515527
self.selected_image.update()
516528

517529
def pick_recovery_result(self, e: FilePickerResultEvent):
518-
path = (", ".join(map(lambda f: f.name, e.files)) if e.files else "Cancelled!")
519-
self.selected_recovery.value = self.selected_recovery.value.split(":")[0] + f": {path}"
530+
path = ", ".join(map(lambda f: f.name, e.files)) if e.files else "Cancelled!"
531+
self.selected_recovery.value = (
532+
self.selected_recovery.value.split(":")[0] + f": {path}"
533+
)
520534
if e.files:
521535
self.recovery_path = e.files[0].path
522536
self.state.recovery_path = e.files[0].path

0 commit comments

Comments
 (0)