-
Notifications
You must be signed in to change notification settings - Fork 8
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
Share: update shortUrl on demand, if needed, when sharing an url #963
Share: update shortUrl on demand, if needed, when sharing an url #963
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving, but have a few questions around the async behavior
self.shortUrl = url | ||
} else { | ||
Task { | ||
self.shortUrl = try? await source.getItemShortUrl(item.givenURL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a risk of no short url by the time the user saves?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see slack discussion, short answer: probably not a lot of real world cases, except offline users sharing via airdrop, where we would share the original url anyway.
self?.share(sharedWithYouItem, at: indexPath, with: sender) | ||
}], | ||
Task { | ||
await self?.share(sharedWithYouItem, at: indexPath, with: sender) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work since its ui and needs main thread?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a652cc4
to
d71a5a9
Compare
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Summary
shortUrl
if it's nil before sharing an item, in order to ensure we shareshortUrl
every time we canReferences
Implementation Details
Item
'sshortUrl
shortUrl
if nil, when sharing an item: this can happen when users migrate from previous versions to8.5.0
Test Steps
shortUrl
is nilpocket.co
urlPR Checklist: