-
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
Notifications > Comment Details: show previous/next comments #17923
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.
Functionally this is working great for me 👍
However, I after I saw the note about the non-weak reference to the navigation delegate I did some testing with the memory graph debugger and I saw that there's a retain cycle going on – the coordinator and detail view controller were never being released if you tapped in and out of numerous comment notifications. There were also some strong self references used in the various actions used in CommentContentTableViewCell
. I've fixed these up on a separate branch – you can see the commits here: https://github.com/wordpress-mobile/WordPress-iOS/compare/feature/17790-arrow_functionality...feature/17790-retain-cycle-fix?expand=1. Hope this helps!
@@ -57,6 +56,15 @@ class NotificationCommentDetailCoordinator: NSObject { | |||
|
|||
private extension NotificationCommentDetailCoordinator { | |||
|
|||
func configureWith(notification: Notification) { |
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.
To avoid the duplicate notification
when calling this method (e.g. configureWith(notification: notification)
) I would suggest naming it configure(with notification: Notification)
. A call then becomes configure(with: notification)
.
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.
What? You don't appreciate ObjC + Swift mashups? 😉 Thank you. Tis been fixed. 😄
You're a star!! Thank you!! Clearly I didn't see the problem, so yes that most definitely helped. I've merged your branch, so ready for another go please. |
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.
Changes look good! I just remembered something else I forgot to mention previously, however I don't think it should hold this PR up – are we able to do something to stop the view jumping around when you switch comment?
Screen.Recording.2022-02-10.at.10.06.33.mov
Hey @frosty .
In short, @dvdchr had some issues getting the view to resize correctly after the content was loaded, so yea it jumps a bit due to refreshing. I won't be addressing that with this project, but maybe we can look at it in the future. Thanks! |
Ref: #17790
In the Comment Notifications details view, the previous and next buttons now display the previous and next comments.
Note: this only works in the Comments filter. The All and Unread filters have not been updated yet.
To test:
notificationCommentDetails
feature.Regression Notes
Potential unintended areas of impact
N/A. Feature is disabled.
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txt
if necessary.