Skip to content
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

WIP: quick note - sync before adding #137

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eyJhb
Copy link

@eyJhb eyJhb commented Jan 8, 2024

This is just some idea, of how to resolve #136. I have about 0 experience with Android development, so I'm 100% sure that is not how it's done.

My initial idea is the following:

  1. User enables the "sync before quick note" feature
  2. User creates a note
  3. Orgzly will try to sync before creating note
    3.1.if sync fails, add the note as usual (without sync)
  4. ? sync + adding should maybe be in the background
  5. Note will be created, and synced as new note is created.

This will ensure, that there are no conflicts, because Orgzly did not sync before creating the note.
I've had countless times, where a bunch of my quick notes need to be destroyed, because I forgot to sync beforehand.

I would really appreciate any pointers with this PR, it's very much a draft, and just to get something on the board :)

@eyJhb eyJhb marked this pull request as draft January 8, 2024 13:52
@amberin
Copy link
Member

amberin commented Apr 11, 2024

Are we thinking that, when this feature is enabled, syncing starts in the background as soon as the "create new note" screen is opened? I suppose that could be a very smooth experience. Different syncing methods and repo size result in very different sync times, but most people seem to use directory repos, which typically sync very quickly, so that combo should work well.

I suppose whatever the logic for storing the new note needs to wait for the syncing to finish?

@eyJhb
Copy link
Author

eyJhb commented Apr 11, 2024

The idea would be to sync when the Quick Note is added, and would block until it's synced.

  • <User Action> add quick note
  • <Background> sync inbox
  • <Background> add note on successful sync
  • Indicate to user it was added or failed

@paulelms
Copy link

paulelms commented Jul 17, 2024

I suppose whatever the logic for storing the new note needs to wait for the syncing to finish?

When the application opens to create a note, synchronization will most likely happen before you save the note. The real problem is when using the "quick note" button in the notification bar, when the text of the note is written directly in the system notification bar without opening the application screen. In this case, the conflict occurs 100% of the time if there were changes on the other side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync before adding quick note to inbox
3 participants