Closed baquer closed 5 years ago
@chashmeetsingh , @jogendra , please review the PR.
Why not do something like this:
var feedbacks: [Feedback]? {
get {
return feedbacks?.sorted(by: {$0.timeStamp > $1.timeStamp})
}
didSet {
feedbackDisplayTableView.reloadData()
}
}
@jogendra , here is the SS.
@baquer I would suggest you to use method suggested by @chashmeetsingh
@baquer I would suggest you to use method suggested by @chashmeetsingh
@jogendra , i tried with the getter, setter method , which @chashmeetsingh suggested , but , when i put the code in getter , its make a recursive call with this warning "All paths through this function will call itself" and the app is getting terminated by giving this error "EXC_BAD_ACCESS (code=2, address=0x7ffedfda1fb8)"
@baquer okay! Approving your PR.
Oh, ok. But why is reloadData()
called before the elements are sorted.
Oh, ok. But why is
reloadData()
called before the elements are sorted.
@chashmeetsingh , thanks for pointing this , it's my mistake 😁 , will fix this .
Please squash your commits.
I am squashing and merging!
Fixes #520
Changes: show feedback by latest timestamp
Screenshots for the change: