Skip to content

Commit

Permalink
Merge pull request #15616 from wordpress-mobile/15483-reinstate_unsee…
Browse files Browse the repository at this point in the history
…n_count_ff

Reimplement unseenPostCount feature flag.
  • Loading branch information
ScoutHarris authored Jan 8, 2021
2 parents 6cf772d + 3f645f3 commit 414fa64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* [*] Invite People: add link to user roles definition web page. [#15530]
* [***] Block Editor: Cross-post suggestions are now available by typing the + character (or long-pressing the toolbar button labelled with an @-symbol) in a post on a P2 site [#15139]
* [**] Reader: Following now only shows non-P2 sites. [#15585]
* [**] Reader site filter: unseen post count is displayed for each site. [#15581]
* [**] Reader site filter: selected filters now persist while in app.[#15594]

16.4
Expand Down
5 changes: 5 additions & 0 deletions WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ enum FeatureFlag: Int, CaseIterable, OverrideableFlag {
case jetpackScan
case activityLogFilters
case jetpackBackupAndRestore
case unseenPostCount

/// Returns a boolean indicating if the feature is enabled
var enabled: Bool {
Expand Down Expand Up @@ -61,6 +62,8 @@ enum FeatureFlag: Int, CaseIterable, OverrideableFlag {
return BuildConfiguration.current == .localDeveloper
case .jetpackBackupAndRestore:
return BuildConfiguration.current == .localDeveloper
case .unseenPostCount:
return false
}
}

Expand Down Expand Up @@ -123,6 +126,8 @@ extension FeatureFlag {
return "Jetpack's Activity Log Filters"
case .jetpackBackupAndRestore:
return "Jetpack Backup and Restore"
case .unseenPostCount:
return "Unseen Posts Count in Reader"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ extension ReaderSiteTopic {
return TableDataItem(topic: topic, configure: { cell in
cell.textLabel?.text = topic.title
cell.detailTextLabel?.text = topic.siteURL
addUnseenPostCount(topic, with: cell)

if FeatureFlag.unseenPostCount.enabled {
addUnseenPostCount(topic, with: cell)
}
})
}
}
Expand Down

0 comments on commit 414fa64

Please sign in to comment.