core/merge: No conflicts for unapplied Note change
core/merge: No conflicts for unapplied Note change

  We added some logic to create a conflicting document in case we detect
  a local modification to a Cozy Note export file. This helps us prevent
  breaking the remote Note by replacing it with a simple markdown
  export.

  However, if the note was modified remotely and we merged the change
  but did not get the chance to apply it on the local filesystem (either
  because the client was stopped or we ran into the Windows bug fixed
  in cc5ff31e4221e6c86eb1bce59df179f5b9eaf5bc and
  af9dc3feef26e4f7c724588d87b8f648f3de3693), we could create a conflict
  after a client restart for no valid reasons (the local — PouchDB
  difference is the result of the change not being applied not of a
  local modification).

  It happens we already have some logic to detect those situations and
  apply the remote change instead of merging a local modification but
  the condition is tested after we detect the conflicting situation.
  By simply swapping those conditional blocks, we can avoid a lot of
  dispensable conflicts.

cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop