Scribe-Android
Scribe-Android copied to clipboard
feat: Add ClipboardDataManager for clipboard history storage
Contributor checklist
- [x] This pull request is on a separate branch and not the main branch
- [x] I have tested my code with the
./gradlew lintKotlin detekt testcommand as directed in the testing section of the contributing guide
Description
This PR implements the data storage layer for the clipboard history feature (Issue #459).
Changes Made:
- Created
ClipboardDataManagerclass that manages clipboard item storage using SQLite - Implemented full CRUD operations: insert, retrieve (latest/pinned), pin/unpin, delete, clear, and time-based expiration
- Added duplicate prevention to avoid storing consecutive identical clipboard items
- Created
ClipboardDataManagerTestwith comprehensive test coverage for all operations - Integrated
ClipboardDataManagerinto theDatabaseManagers, following the existing patterns
Testing:
- All unit tests pass via
./gradlew test - Detekt and ktlint checks pass
- Tests verify insert, retrieve, pin/unpin, delete, and expiration functionality
This is PR #1 from the following PRs (forming different parts of the implementation)
- Data Storage Layer (this PR)
- Clipboard Monitoring (next)
- UI Components
- Full Keyboard Integration
Related issue
- #459
Thank you for the pull request! 💙
The Scribe-Android team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and Android rooms once you're in. Also consider attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊
[!NOTE] Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.
Maintainer Checklist
The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
-
[x] The linting, formatting and testing workflows within the PR checks do not indicate new errors in the files changed
- Tests may need to be reran as they're at times not deterministic
-
[x] The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)
Hey @shrimpnaur 👋 Thanks so much for the PR! Could we ask that you fix the license headers and KTLint issues? You can also set up pre-commit as directed in the readme/contributing guide to check these rules on commit :)
Thanks so much, @shrimpnaur! We'll try to get to the review in the coming days :)