-
Notifications
You must be signed in to change notification settings - Fork 7
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
Introduce a freshness indicator for the goal screen #537
Introduce a freshness indicator for the goal screen #537
Conversation
660661c
to
1228e01
Compare
1228e01
to
6616f94
Compare
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.
Overall approach looks good, and I like the idea of extracting FreshnessIndicatorView
as its own component. I added some requests for local changes.
When testing, could you also verify the time since update changes when you just leave the app open with the goal view showing?
} | ||
|
||
self.updateLastUpdatedLabel() | ||
Timer.scheduledTimer(timeInterval: 60, target: self, selector: #selector(GoalViewController.updateLastUpdatedLabel), userInfo: nil, repeats: true) |
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.
[Consider] Wouldn't this timer make more sense being part of the FreshnessIndicatorView
?
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.
The reason I placed it here is because this is also a Controller whereas the Freshness one is just a view.
01efea0
to
67b1c7a
Compare
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.
Still waiting on changes to GoalViewController
a variation of _a loading indicator for goals_
DRY the view showing both the gallery's and a goal's freshness (last fetched date)
67b1c7a
to
b3d893c
Compare
This reverts commit 1f3af669fdc5296092b8df4eba0d3d7f855ee226. removing a commit that did not directly contribute to the solution
5975456
to
d68cdbd
Compare
fileprivate var goalImageView = GoalImageView(isThumbnail: false) | ||
fileprivate var datapointTableController = DatapointTableViewController() | ||
fileprivate var dateTextField = UITextField() |
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.
fileprivate var goalImageView = GoalImageView(isThumbnail: false) | |
fileprivate var datapointTableController = DatapointTableViewController() | |
fileprivate var dateTextField = UITextField() | |
fileprivate let goalImageView = GoalImageView(isThumbnail: false) | |
fileprivate let datapointTableController = DatapointTableViewController() | |
fileprivate let dateTextField = UITextField() |
var deadbeatView = UIView() | ||
var outofdateView = UIView() |
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.
var deadbeatView = UIView() | |
var outofdateView = UIView() | |
private let deadbeatView = UIView() | |
private let outofdateView = UIView() |
LGTM, merged! |
Summary
In line with #246, this provides an indicator of freshness on the goal screen. It reuses the one from the gallery screen.
Media
last.fetch.on.gallery.and.goalvc.mp4
Validation
Ran app in simulator
Viewed both gallery and goal, navigating back and forth.
Sent the app to background, back into foreground, varying sometimes with the gallery open, sometimes with a goal open.
Also watched the last updated since label be updated while just leaving the app open with the goal view showing
Fixes #246