clear the cache after deleting *all* messages
This commit is contained in:
@@ -8,8 +8,9 @@ from typing import List, Union
|
||||
|
||||
from gotify_tray import gotify
|
||||
from gotify_tray.__version__ import __title__
|
||||
from gotify_tray.database import Cache, Downloader, Settings
|
||||
from gotify_tray.database import Downloader, Settings
|
||||
from gotify_tray.tasks import (
|
||||
ClearCacheTask,
|
||||
DeleteApplicationMessagesTask,
|
||||
DeleteAllMessagesTask,
|
||||
DeleteMessageTask,
|
||||
@@ -332,6 +333,9 @@ class MainApplication(QtWidgets.QApplication):
|
||||
)
|
||||
self.delete_application_messages_task.start()
|
||||
elif isinstance(item, ApplicationAllMessagesItem):
|
||||
self.clear_cache_task = ClearCacheTask()
|
||||
self.clear_cache_task.start()
|
||||
|
||||
self.delete_all_messages_task = DeleteAllMessagesTask(self.gotify_client)
|
||||
self.delete_all_messages_task.start()
|
||||
else:
|
||||
|
||||
@@ -7,7 +7,12 @@ from gotify_tray.gotify import GotifyMessageModel
|
||||
from gotify_tray.gui.models import MessagesModelItem
|
||||
from . import MessageWidget
|
||||
from gotify_tray.utils import get_icon, verify_server, open_file
|
||||
from gotify_tray.tasks import ExportSettingsTask, ImportSettingsTask, CacheSizeTask, ClearCacheTask
|
||||
from gotify_tray.tasks import (
|
||||
ExportSettingsTask,
|
||||
ImportSettingsTask,
|
||||
CacheSizeTask,
|
||||
ClearCacheTask,
|
||||
)
|
||||
from gotify_tray.gui.themes import get_themes
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
Reference in New Issue
Block a user