Repository navigation
Stop sync without a usable server, apply defaults at send time, add Direct Share - #36
Merged
Merged
Conversation
Sync can run only when the server URL and token are set and no persistent error has stopped it. The scheduler checks this itself, so sharing, the add form, deletion, startup, and new networks no longer enqueue a job that would start and exit. The periodic recovery check is registered only while sync can run. Refs #35
A rejected token (401/403), a missing API (404), a non-HTTPS server URL, or an unreadable token cannot be fixed by another attempt. The worker now records the problem and finishes without a retry, and no sync work is scheduled until the user saves settings, taps Sync now, or retries a link. Transient errors keep the exponential backoff. Refs #35
Saving a link while the server is not set up, or while a persistent error has stopped sync, now adds the reason to the Toast and shows a notification that returns on every such save. The Queue status line names the problem that stopped sync. Refs #35
Default tags, unread, and archive are read from the current settings for every POST, so changing them affects links that are already queued, including links saved before the server was set up. A queue entry keeps only the tags typed for it. BREAKING CHANGE: Room schema version 3 drops the unread and archived columns. Links already queued keep the default tags they were saved with and take the flags from the current settings. Refs #35
ShareDing now appears in the Direct Share row of the share sheet. The app publishes one long-lived sharing shortcut on start and again after each share, and still registers a single ACTION_SEND target. BREAKING CHANGE: the minimum version is Android 10 (API 29), the first one with sharing shortcuts. Installs on Android 9 stay on 0.2.x. Refs #35
Default tags are no longer merged into a link in the Add Bookmark form, so its length check does not see them. Check them when settings are saved instead. Refs #35
Merged
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.
What changes
Sync no longer runs, and no background work is scheduled, when it has nowhere to send links: either the server is not set up, or a persistent error stopped it. A persistent error is a rejected token (401/403), a missing API (404), a non-HTTPS server URL, or an unreadable token. Sync starts again when the user saves settings, taps Sync now, or taps Retry.
Saving a link in that state adds the reason to the Toast, shows a notification that returns on every such save, and the Queue status line names the problem.
Default tags, unread, and archive are now applied when a link is sent, so changing them affects links already in the queue. Queue entries no longer store the two flags; Room migration 2 to 3 drops the columns and keeps every other field.
ShareDing publishes a Direct Share target. The minimum version moves to Android 10 (API 29), the first one with sharing shortcuts.
Notes for review
Verification
./gradlew --continue clean assembleDebug assembleRelease testDebugUnitTest lintDebug lintRelease connectedDebugAndroidTestpasses with 73 connected tests on an API 36 emulator. On the same emulator the system share sheet showed ShareDing in the Direct Share row, and selecting it queued the link.Closes #35