mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-12 10:47:05 +02:00
Start work on refactoring notifications handling
Makes the code cleaner and easily mockable for testing. Also, add code to handle closing notifications on Linux.
This commit is contained in:
@@ -11,7 +11,6 @@ from urllib.request import urlopen
|
||||
from .config import atomic_save
|
||||
from .constants import Version, cache_dir, clear_handled_signals, kitty_exe, version, website_url
|
||||
from .fast_data_types import add_timer, get_boss, monitor_pid
|
||||
from .notify import notify
|
||||
from .utils import log_error, open_url
|
||||
|
||||
CHANGELOG_URL = website_url('changelog')
|
||||
@@ -37,11 +36,7 @@ def version_notification_log() -> str:
|
||||
|
||||
|
||||
def notify_new_version(release_version: Version) -> None:
|
||||
notify(
|
||||
'kitty update available!',
|
||||
'kitty version {} released'.format('.'.join(map(str, release_version))),
|
||||
identifier='new-version',
|
||||
)
|
||||
get_boss().notification_manager.send_new_version_notification('.'.join(map(str, release_version)))
|
||||
|
||||
|
||||
def get_released_version() -> str:
|
||||
|
||||
Reference in New Issue
Block a user