Skip to content

Commit 45ec59e

Browse files
committed
changed notifications
1 parent 748c5c2 commit 45ec59e

3 files changed

Lines changed: 8 additions & 12 deletions

File tree

wfc/file.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,4 @@ def process_things():
167167
f"Deleted {_bytes_to_string(bytes_to_delete)} from your computer.",
168168
f"{len(files_to_delete)} files and {len(folders_to_delete)} folders.\n"
169169
+ f"{amount_reason_unpacked} files already unpacked, {amount_reason_age} too old ({config.data[2]} days)",
170-
False,
171170
)

wfc/logger.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def show_summary():
4141
notification.show_notification(
4242
"There's nothing to delete!",
4343
f"You have saved {size_saved:.2f} GB in the last 30 days.",
44-
True,
4544
)
4645

4746

wfc/notification.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,24 @@
33
import win11toast
44
from wfc import paths
55

6-
LOG_BUTTON_TXT = "Open Log"
7-
RECYCLE_BIN_BUTTON_TXT = "Open Recycle Bin"
6+
LOG_BTN_TXT = "Open Log"
7+
DISMISS_BTN_TXT = "Dismiss"
88

99

1010
def _tray_clicked(button: dict):
1111
button_name_pressed = button["arguments"].split(":")[1].strip()
12-
if button_name_pressed == LOG_BUTTON_TXT:
12+
if button_name_pressed == LOG_BTN_TXT:
1313
os.startfile(paths.LOG_PATH)
14-
elif button_name_pressed == RECYCLE_BIN_BUTTON_TXT:
15-
os.startfile("shell:RecycleBinFolder")
14+
elif button_name_pressed == DISMISS_BTN_TXT:
15+
...
16+
# sys.exit(0)
1617

1718

18-
def show_notification(title: str, message: str, summary: bool):
19+
def show_notification(title: str, message: str):
1920
time.sleep(1)
2021

2122
icon = {"src": paths.ICON_PATH, "placement": "appLogoOverride"}
22-
buttons = [LOG_BUTTON_TXT, RECYCLE_BIN_BUTTON_TXT]
23-
24-
if summary:
25-
buttons.remove(RECYCLE_BIN_BUTTON_TXT)
23+
buttons = [LOG_BTN_TXT, DISMISS_BTN_TXT]
2624

2725
win11toast.toast(
2826
title,

0 commit comments

Comments
 (0)