Skip to content

Commit

Permalink
mobile: ft.PermissionHandler is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulMelody committed Mar 1, 2025
1 parent 8f207ca commit 6816cc2
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 25 deletions.
1 change: 1 addition & 0 deletions docs/credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@
| textual | Modern Text User Interface framework | MIT License |
| textual-fspicker | A simple Textual filesystem picker dialog library. | MIT License |
| flet | Flet for Python - easily build interactive multi-platform apps in Python | Apache Software License |
| flet-permission-handler | PermissionHandler control for Flet | Apache Software License |
| repro-zipfile | A tiny, zero-dependency replacement for Python's zipfile.ZipFile for creating reproducible/deterministic ZIP archives. | MIT License |
3 changes: 2 additions & 1 deletion libresvip/mobile/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import get_args, get_type_hints

import flet as ft
import flet_permission_handler as fph
import more_itertools
from pydantic import BaseModel
from pydantic_core import PydanticUndefined
Expand Down Expand Up @@ -416,7 +417,7 @@ def on_upload_progress(e: ft.FilePickerUploadEvent) -> None:
task_list_view.current.update()

file_picker = ft.FilePicker(on_result=on_files_selected, on_upload=on_upload_progress)
permission_handler = ft.PermissionHandler()
permission_handler = fph.PermissionHandler()
page.overlay.extend([file_picker, permission_handler])

def check_permission(e: ft.ControlEvent) -> None:
Expand Down
1 change: 0 additions & 1 deletion packaging/build_apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ fi
cp ../libresvip/mobile/__main__.py main.py
uv run flet build apk -v \
--android-permissions android.permission.READ_EXTERNAL_STORAGE=True android.permission.WRITE_EXTERNAL_STORAGE=True android.permission.MANAGE_EXTERNAL_STORAGE=True \
--include-packages flet_permission_handler \
--org org.soulmelody \
--project LibreSVIP \
--build-version $LIBRESVIP_VERSION \
Expand Down
2 changes: 1 addition & 1 deletion packaging/requirements-flet.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
flet
flet-permission-handler
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ webui = [
]
mobile = [
"flet[cli,desktop]>=0.27.4",
"flet-permission-handler>=0.1.0",
"libresvip[upath]",
]
desktop = [
Expand Down
58 changes: 36 additions & 22 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6816cc2

Please sign in to comment.