- Improve drag/drop reliability be increasing the hit slop area for starting the drag.
- Ensure drag survives between rerenders
- Add a solid background to dragged item so it doesn't conflict with items underneath it
* mobile: pass value for items when searching on main screen to match other screens' pattern
Signed-off-by: Suyadi <afsuyadi@gmail.com>
* core: guard notesWithHighlighting against an undefined notes selector.
Signed-off-by: Suyadi <afsuyadi@gmail.com>
* core: add regression test for notesWithHighlighting crash.
Signed-off-by: Suyadi <afsuyadi@gmail.com>
* core: revert changes after feedback
Signed-off-by: Suyadi <afsuyadi@gmail.com>
* mobile: ensure type: "note" will make items become mandatory.
Signed-off-by: Suyadi <afsuyadi@gmail.com>
* core: remove tests after feedback
Signed-off-by: Suyadi <afsuyadi@gmail.com>
1. Use noteId defined in editorMessage when saving content, never use tabId since it can point to a different note since a tab can load a different note while a note save message is coming across the bridge.
2. If saving fails and editor saves save payloads in localStorage, add the noteId to them so we know which note the content belongs to.
3. Pending content saves must keep noteId and edit time so when we save them later, they save into the correct note and if the content is newer, we skip saving.
4. Fix the debounce key so cross contamination can never occur in new notes between two tabs.
From Android 16 QPR1 widgets are lock screen eligible by default, so the
note widget (title + preview text) and the reminders widget (titles and
descriptions) could render user content on a locked device.
Adds res/xml-v36 overrides declaring not_keyguard for both. The new note
widget is left eligible - it is only a button and leaks nothing.
ThemeOverlay.Notesnook.AppWidgetContainer declared and set
appWidgetBackgroundColor/appWidgetTextColor, but no layout ever read
them - leftovers from the Android Studio widget template, in a palette
unrelated to the app. Removes the overlay, its declare-styleable, the
android:theme references, and the light_blue_* colors that only it used.
Also replaces the hardcoded 10dp widget corner radius with
system_app_widget_background_radius on API 31+ (10dp fallback below),
so the widgets match the rest of the home screen.
updateWidgetNote scanned every key in the appPreview preferences and
rewrote any whose value contained the note id. That included the
remindersList key, so a match replaced the entire reminders list with a
note and then threw NumberFormatException parsing "remindersList" as a
widget id. hasWidgetNote had the same unguarded scan.
Match on the parsed note's id instead of on the raw JSON containing it,
and treat only keys that parse as an int as widget entries, so non-widget
keys are excluded structurally rather than by name. Also guards the casts
and gson parses that could throw on a malformed entry.
Push the reminder rows into the widget update itself via RemoteViewsCompat
instead of binding a RemoteViewsService adapter, which has been deprecated
since API 31. Removes the bound service entirely, so there is no cached
factory to invalidate and no separate notifyAppWidgetViewDataChanged step
that can race or be missed.
Adds androidx.core:core-remoteviews for the API 24-30 fallback. Row ids are
now derived from the reminder id rather than the list position, and the list
is capped at 50 rows so the update fits in a binder transaction.