Skip to content

feat: add "Clear all" button to History screen - #9

Merged
vssinghh merged 1 commit into
vssinghh:mainfrom
Rutvik2598:feature/clear-all-history
Jun 25, 2026
Merged

vssinghh merged 1 commit into
vssinghh:mainfrom
Rutvik2598:feature/clear-all-history

Conversation

@Rutvik2598

Copy link
Copy Markdown
Contributor

Summary

Adds a "Clear all" button to the History screen so users can wipe their entire notification history in one action. For a privacy-first app, clearing your own data should be quick and obvious.

Closes #7

What changed

The data layer already exposed clearAllLogs() end to end (NotificationLogDao → HistoryRepository → HistoryRepositoryImpl), so this PR only wires up the UI:

  • HistoryViewModel — add clearAll() delegating to HistoryRepository.clearAllLogs(). No new state needed; the existing reactive historyLogs flow emits an empty list once the table clears.
  • HistoryScreen — add a trash icon beside the search field (disabled when the list is empty) that opens a confirmation dialog before deleting.

Screenshots

History screen with Clear button Confirmation dialog

How to test

  1. Have some notification history (or seed a few entries).
  2. Open History → tap the trash icon (top-right, next to search).
  3. Cancel → nothing changes.
  4. Clear → all entries are removed and the icon greys out (disabled when empty).

Notes

- Add clearAll() in HistoryViewModel delegating to HistoryRepository.clearAllLogs()
- Add trash icon beside History search field, disabled when list is empty
- Add confirmation dialog before permanently deleting all notification logs
@vssinghh
vssinghh merged commit 6e3f8ed into vssinghh:main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 'Clear all history' button to History screen

2 participants