Skip to content

Commit 649830e

Browse files
committed
Add download buttons for f-droid and microg
1 parent 2020425 commit 649830e

2 files changed

Lines changed: 35 additions & 4 deletions

File tree

openandroidinstaller/views/addon_view.py

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ def build(self):
7272
7373
The recommended way to install MicroG is to use the zip file provided here:
7474
- [https://github.com/FriendlyNeighborhoodShane/MinMicroG_releases/releases](https://github.com/FriendlyNeighborhoodShane/MinMicroG_releases/releases).
75+
76+
## F-Droid Appstore
77+
78+
F-Droid is an installable catalogue of libre software apps for Android. The F-Droid client app makes it easy to browse, install, and keep track of updates on your device.
79+
You can get the zip file to install this addon here: [https://f-droid.org/en/packages/org.fdroid.fdroid.privileged.ota/](https://f-droid.org/en/packages/org.fdroid.fdroid.privileged.ota/).
7580
""",
7681
on_tap_link=lambda e: self.page.launch_url(e.data),
7782
),
@@ -122,7 +127,20 @@ def build(self):
122127
self.right_view.controls.append(
123128
Column(
124129
[
125-
Text("Here you can find instructions on how to download the right GApps for your device."),
130+
Text("Here you can download the F-Droid App-Store:"),
131+
Row(
132+
[
133+
ElevatedButton(
134+
"Download F-Droid App-Store",
135+
icon=icons.DOWNLOAD_OUTLINED,
136+
on_click=lambda _: webbrowser.open(
137+
"https://f-droid.org/en/packages/org.fdroid.fdroid.privileged.ota/"
138+
),
139+
expand=True,
140+
),
141+
]
142+
),
143+
Text("Here you can find instructions on how to download the right Google apps for your device."),
126144
Row(
127145
[
128146
ElevatedButton(
@@ -135,6 +153,19 @@ def build(self):
135153
),
136154
]
137155
),
156+
Text("Here you can download MicroG:"),
157+
Row(
158+
[
159+
ElevatedButton(
160+
"Download MicroG",
161+
icon=icons.DOWNLOAD_OUTLINED,
162+
on_click=lambda _: webbrowser.open(
163+
"https://github.com/FriendlyNeighborhoodShane/MinMicroG_releases/releases"
164+
),
165+
expand=True,
166+
),
167+
]
168+
),
138169
Divider(),
139170
]
140171
)

openandroidinstaller/views/step_view.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,10 @@ def display_progress_bar(self, line: str):
337337
if (type(line) == str) and line.strip():
338338
result = re.search(r"\(\~(\d{1,3})\%\)|(Total xfer:|adb: failed to read command: Success)", line.strip())
339339
if result:
340-
if result.group(1):
341-
percentage_done = int(result.group(1))
342-
elif result.group(2):
340+
if result.group(2):
343341
percentage_done = 100
342+
elif result.group(1):
343+
percentage_done = int(result.group(1))
344344

345345
# create the progress bar on first occurrence
346346
if percentage_done == 0:

0 commit comments

Comments
 (0)