Skip to content

Instantly share code, notes, and snippets.

@astralbodies
Last active May 19, 2017 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astralbodies/ed9b81e75d9fceea79c2aca4c150bba3 to your computer and use it in GitHub Desktop.
Save astralbodies/ed9b81e75d9fceea79c2aca4c150bba3 to your computer and use it in GitHub Desktop.
Stats overrides for snapshots
[2] $ diff InsightsTableViewController.m ~/src/WordPressCom-Stats-iOS/WordPressCom-Stats-iOS/UI/InsightsTableViewController.m -u ✘∞ ∞
--- InsightsTableViewController.m 2017-05-19 09:23:22.000000000 -0500
+++ /Users/aaron/src/WordPressCom-Stats-iOS/WordPressCom-Stats-iOS/UI/InsightsTableViewController.m 2016-12-14 11:16:23.000000000 -0600
@@ -1149,20 +1149,11 @@
{
if (summary) {
weakSelf.sectionData[@(StatsSectionInsightsTodaysStats)] = summary;
- summary.views = @"65";
- summary.visitors = @"58";
- summary.likes = @"12";
- summary.comments = @"3";
}
}
latestPostSummaryCompletionHandler:^(StatsLatestPostSummary *summary, NSError *error)
{
weakSelf.sectionData[@(StatsSectionInsightsLatestPostSummary)] = summary;
- summary.views = @"20";
- summary.likes = @"3";
- summary.comments = @"1";
- summary.postAge = [NSString stringWithFormat:NSLocalizedString(@"%d days", @"Age between dates over one day."), 2];
-
[weakSelf.tableView beginUpdates];
NSUInteger sectionNumber = [weakSelf.sections indexOfObject:@(StatsSectionInsightsLatestPostSummary)];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment