mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Opt: Minor improvements on toast notifications
This commit is contained in:
parent
80cba0e197
commit
7bf5499fc2
@ -20,9 +20,13 @@ class Device(Screenshot, Control, AppControl):
|
||||
|
||||
def send_notification(self, title, message):
|
||||
if self.config.ENABLE_NOTIFICATIONS and sys.platform == 'win32':
|
||||
from win10toast_persist import ToastNotifier
|
||||
notify = ToastNotifier()
|
||||
notify.show_toast(title, message, icon_path='assets/gooey/icon.ico', duration=None)
|
||||
from notifypy import Notify
|
||||
notification = Notify()
|
||||
notification.title = title
|
||||
notification.message = message
|
||||
notification.application_name = "AzurLaneAutoScript"
|
||||
notification.icon = "assets/gooey/icon.ico"
|
||||
notification.send(block=False)
|
||||
|
||||
def handle_night_commission(self, hour=21, threshold=30):
|
||||
"""
|
||||
|
||||
@ -13,5 +13,6 @@ cnocr==1.2.2
|
||||
gooey
|
||||
colored
|
||||
# python-Levenshtein
|
||||
win10toast-persist
|
||||
# win10toast-persist
|
||||
notify-py
|
||||
jellyfish
|
||||
Loading…
Reference in New Issue
Block a user