-
-
Notifications
You must be signed in to change notification settings - Fork 45
Add pin to status bar note action #962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3d0a59b
pin to status bar note action
Crustack 16a6b7e
Fix cleaning up reminders on delete
Crustack fa09499
Add pin to status to overview actions
Crustack 25d93f8
Move ModelFolderObserver into separate class file
Crustack 9d9d468
PR Fixes
Crustack 3c990aa
Fix actionmode loading postvalue
Crustack 7bfd6ca
Fix restoring attachments when deleting
Crustack 058cc05
Dont allow pin to status bar for archived notes
Crustack 6187744
PR Fixes
Crustack fc79645
PR Fixes
Crustack fe48981
PR Fixes
Crustack 0086ec1
update docusaurs
Crustack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
170 changes: 170 additions & 0 deletions
170
app/schemas/com.philkes.notallyx.data.NotallyDatabase/10.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| { | ||
| "formatVersion": 1, | ||
| "database": { | ||
| "version": 10, | ||
| "identityHash": "8cb21a4c0f6224c35dc6038a4feb74d0", | ||
| "entities": [ | ||
| { | ||
| "tableName": "BaseNote", | ||
| "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` TEXT NOT NULL, `folder` TEXT NOT NULL, `color` TEXT NOT NULL, `title` TEXT NOT NULL, `pinned` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, `modifiedTimestamp` INTEGER NOT NULL, `labels` TEXT NOT NULL, `body` TEXT NOT NULL, `spans` TEXT NOT NULL, `items` TEXT NOT NULL, `images` TEXT NOT NULL, `files` TEXT NOT NULL, `audios` TEXT NOT NULL, `reminders` TEXT NOT NULL, `viewMode` TEXT NOT NULL, `isPinnedToStatus` INTEGER NOT NULL)", | ||
| "fields": [ | ||
| { | ||
| "fieldPath": "id", | ||
| "columnName": "id", | ||
| "affinity": "INTEGER", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "type", | ||
| "columnName": "type", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "folder", | ||
| "columnName": "folder", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "color", | ||
| "columnName": "color", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "title", | ||
| "columnName": "title", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "pinned", | ||
| "columnName": "pinned", | ||
| "affinity": "INTEGER", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "timestamp", | ||
| "columnName": "timestamp", | ||
| "affinity": "INTEGER", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "modifiedTimestamp", | ||
| "columnName": "modifiedTimestamp", | ||
| "affinity": "INTEGER", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "labels", | ||
| "columnName": "labels", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "body", | ||
| "columnName": "body", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "spans", | ||
| "columnName": "spans", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "items", | ||
| "columnName": "items", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "images", | ||
| "columnName": "images", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "files", | ||
| "columnName": "files", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "audios", | ||
| "columnName": "audios", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "reminders", | ||
| "columnName": "reminders", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "viewMode", | ||
| "columnName": "viewMode", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| }, | ||
| { | ||
| "fieldPath": "isPinnedToStatus", | ||
| "columnName": "isPinnedToStatus", | ||
| "affinity": "INTEGER", | ||
| "notNull": true | ||
| } | ||
| ], | ||
| "primaryKey": { | ||
| "autoGenerate": true, | ||
| "columnNames": [ | ||
| "id" | ||
| ] | ||
| }, | ||
| "indices": [ | ||
| { | ||
| "name": "index_BaseNote_id_folder_pinned_timestamp_labels", | ||
| "unique": false, | ||
| "columnNames": [ | ||
| "id", | ||
| "folder", | ||
| "pinned", | ||
| "timestamp", | ||
| "labels" | ||
| ], | ||
| "orders": [], | ||
| "createSql": "CREATE INDEX IF NOT EXISTS `index_BaseNote_id_folder_pinned_timestamp_labels` ON `${TABLE_NAME}` (`id`, `folder`, `pinned`, `timestamp`, `labels`)" | ||
| } | ||
| ], | ||
| "foreignKeys": [] | ||
| }, | ||
| { | ||
| "tableName": "Label", | ||
| "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`value` TEXT NOT NULL, PRIMARY KEY(`value`))", | ||
| "fields": [ | ||
| { | ||
| "fieldPath": "value", | ||
| "columnName": "value", | ||
| "affinity": "TEXT", | ||
| "notNull": true | ||
| } | ||
| ], | ||
| "primaryKey": { | ||
| "autoGenerate": false, | ||
| "columnNames": [ | ||
| "value" | ||
| ] | ||
| }, | ||
| "indices": [], | ||
| "foreignKeys": [] | ||
| } | ||
| ], | ||
| "views": [], | ||
| "setupQueries": [ | ||
| "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", | ||
| "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '8cb21a4c0f6224c35dc6038a4feb74d0')" | ||
| ] | ||
| } | ||
| } |
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
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
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
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
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/philkes/notallyx/data/dao/DaoExtensions.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package com.philkes.notallyx.data.dao | ||
|
|
||
| import android.content.Context | ||
| import com.philkes.notallyx.data.model.Folder | ||
| import com.philkes.notallyx.utils.cancelPinAndReminders | ||
| import com.philkes.notallyx.utils.pinAndScheduleReminders | ||
|
|
||
| suspend fun Context.moveBaseNotes(baseNoteDao: BaseNoteDao, ids: LongArray, folder: Folder) { | ||
| // Only reminders of notes in NOTES folder are active | ||
| if (folder == Folder.DELETED) { | ||
| baseNoteDao.move(ids, folder, System.currentTimeMillis()) | ||
| } else { | ||
| baseNoteDao.move(ids, folder) | ||
| } | ||
| val notes = baseNoteDao.getByIds(ids) | ||
| // Only reminders of notes in NOTES folder are active | ||
| when (folder) { | ||
| Folder.NOTES -> pinAndScheduleReminders(notes) | ||
| else -> cancelPinAndReminders(notes) | ||
| } | ||
| } |
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.