Rewrite Activity Tracker with theme support, add functionality to delete entries#1430
Open
Rewrite Activity Tracker with theme support, add functionality to delete entries#1430
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request rewrites the Activity Tracker UI with comprehensive theme support and adds the ability to delete play activity entries. The implementation introduces a new database column deletion_id to track hidden entries, migration scripts to update existing databases, and a restore tool accessible through the Tweaks menu.
Changes:
- Complete rewrite of playActivityUI using the theme system and list components for consistent UI
- Added database support for soft-deletion of play activity entries via
deletion_idcolumn - Implemented scroll acceleration and entry deletion features with confirmation dialogs
- Added migration script and restore tool for managing deleted entries
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| static/build/.tmp_update/script/restore_deleted_play_activity.sh | New script to restore all deleted activity tracker entries by resetting deletion_id |
| static/build/.tmp_update/script/migration/00019_add_hidden_column_play_activity.sh | Migration script to add deletion_id column to existing databases |
| src/tweaks/tools_defs.h | Added new tool entry for restore functionality |
| src/tweaks/tools.h | Implemented restore tool function and fixed tool array indices |
| src/tweaks/menus.h | Added menu entry for the restore tool |
| src/tweaks/icons.h | Updated list_free calls to include icon_ptr_keep parameter |
| src/tweaks/appstate.h | Updated list_free calls across menu structures |
| src/prompt/prompt.c | Updated list_free call signature |
| src/playActivityUI/res/background.png | New background image resource (binary file) |
| src/playActivityUI/playActivityUI.h | Removed old header file as part of rewrite |
| src/playActivityUI/playActivityUI.c | Complete rewrite with theme support, list-based UI, deletion feature |
| src/playActivityUI/Makefile | Added required SDL libraries for theme support |
| src/playActivity/playActivityDB.h | Added play_activity_hide function, updated queries to respect deletion_id, improved memory cleanup |
| src/common/utils/timer.h | New debug timing utility for performance measurement |
| src/common/utils/file.c | Fixed memory leak in file_cleanName function |
| src/common/theme/render/list.h | Added PLAYACTIVITY item type rendering with numbering |
| src/common/components/list.h | Added scroll acceleration, updated list_free signature to prevent double-free |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
static/build/.tmp_update/script/restore_deleted_play_activity.sh
Outdated
Show resolved
Hide resolved
static/build/.tmp_update/script/migration/00019_add_hidden_column_play_activity.sh
Show resolved
Hide resolved
32b2b64 to
20ca152
Compare
Add tool in tweaks to reset hidden entries Add migration script to add the necessary column for this
Add some comments
fix item numbers not updating when on last page fix some not free'd variables slight refactoring
add timer.h add accelerated scroll on button hold fix memory leak in file_cleanName
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Fix segfault when footer image is missing (NULL check) - Fix SQL column indices to match query with image_path column
244b120 to
7afa4a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added theming, implemented scrolling through items and deletion of entries in activity tracker.
|
Items are deleted by setting the new column roms.deletion_id for the selected item to the highest corresponding play_activity rowid.
Added a tool to restore deleted items to Tweaks
Added a migration script to add the roms.deletion_id column if necessary.
Closes #1326
TODO:
deletion_idcolumn (GameSwitcher.. ?)Testing:
Test the migration script
Test deleting items
Test restoring deleted items