mirror of
https://github.com/markqvist/Sideband.git
synced 2026-04-27 22:25:39 +00:00
Render toast component in-application on all platforms
This commit is contained in:
parent
75e6fd05e8
commit
6edc6e3771
1 changed files with 7 additions and 3 deletions
|
|
@ -2,10 +2,14 @@ __all__ = ("toast",)
|
|||
|
||||
from kivy.utils import platform
|
||||
|
||||
use_native_toast = False
|
||||
|
||||
if platform == "android":
|
||||
try:
|
||||
from .androidtoast import toast
|
||||
except ModuleNotFoundError:
|
||||
if use_native_toast:
|
||||
try: from .androidtoast import toast
|
||||
except ModuleNotFoundError: from .kivytoast import toast
|
||||
else:
|
||||
from .kivytoast import toast
|
||||
|
||||
else:
|
||||
from .kivytoast import toast
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue