Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Fix: tapping links to drafts could (erroneously) open the viewer instead of the editor #1079

Merged
merged 4 commits into from
Jan 26, 2024

Conversation

bfollington
Copy link
Collaborator

@bfollington bfollington commented Jan 26, 2024

Our findBestLink function was not considering Did.local as a possibility. Updated the code + tests to cover these cases.

I found this in-app in two places:

  1. tapping a draft in the deck view opens in the viewer (uneditable)
  2. tapping a backlink to a draft (in the related notes section) opened the viewer

@bfollington bfollington marked this pull request as ready for review January 26, 2024 01:45
// Is this address ours? Trim off the peer
guard did != ourIdentity else {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was clearer but obviously not an essential change

Copy link
Collaborator

@gordonbrander gordonbrander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! And thanks for the regression test.

@gordonbrander gordonbrander merged commit 75f82d1 into main Jan 26, 2024
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants