-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unsave post from saved tab #15502
Unsave post from saved tab #15502
Conversation
ReaderSavedPostCellActionsDelegate was deleted in #15414, but turns out we need it.
willSet isn’t called unless contentType is set explicitly. As a result, unsaving a post in the Saved tab wasn’t executing toggleSavedForLater.
Don’t display a success/failure notice if a post is saved/unsaved from the savedStream
You can trigger an installable build for these changes by visiting CircleCI here. |
self.presentSuccessNotice(for: post, context: context, origin: origin, completion: completion) | ||
if origin == .otherStream { | ||
self.presentSuccessNotice(for: post, context: context, origin: origin, completion: completion) | ||
} | ||
completion?() | ||
}, failure: { error in | ||
}, failure: { error in | ||
if origin == .otherStream { | ||
self.presentErrorNotice(error, activating: !post.isSavedForLater) | ||
completion?() | ||
} | ||
completion?() |
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.
I don't think we should show the success/failure notice if a user unsaves a post from the Saved
tab for the following reasons:
- The
ReaderSavedPostUndoCell
already indicates to the user that the post has been "unsaved" - The notice appears when a user navigates away from the
Saved
tab... so the notice seems out of context
Let me know what you think! 😄
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.
Sounds reasonable. I think to the ReaderSavedPostUndoCell
is sufficient.
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
Hey @momo-ozawa . I'm seeing two issues:
2 ) I save a post, go to 'Saved', unsave there, return to the original stream, pull to refresh, the post is still saved. |
Hi @ScoutHarris! Thanks so much for catching those issues! 🙏
I made a dedicated issue for this bug 👍
Fixed! 6692d93 |
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.
Works as advertised!
Should be merged into 16.4 |
Fixes #15381
This PR addresses fixes the following:
Saved
tab, the post cell wasn't being updated to aReaderSavedPostUndoCell
ReaderSavedPostCellActionsDelegate
was deleted in Reader: remove unused files #15414, but looks like we need it for this usecase 👀Saved
tab, the post wasn't being unsavedTo test:
Following
tabSaved
tab and unsave the postReaderSavedPostUndoCell
✅Following
tab and pull down to refreshSaved
tabSaved
tab ✅PR submission checklist:
RELEASE-NOTES.txt
if necessary.