Skip to content

Commit

Permalink
Update footer
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed May 4, 2024
1 parent 838cc2b commit 54b6b93
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* [*] Make it easier to "Share" and "Blaze" a published post with an updated success view [##23128]
* [*] Add support for viewing trashed posts and pages and restoring them from the editor [#23142]
* [*] Update the "More" menu in the Editor to use modern iOS design and update copy to match Gutenberg [#23145]
* [*] Update the "Revisions" list design and fix an issue with the footer displaying incorrect "Date Created" for drafts [#23145]

24.8
-----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import UIKit

class RevisionsTableViewController: UITableViewController {
typealias RevisionLoadedBlock = (AbstractPost) -> Void

Expand Down Expand Up @@ -76,7 +78,9 @@ private extension RevisionsTableViewController {
refreshControl.addTarget(self, action: #selector(refreshRevisions), for: .valueChanged)
self.refreshControl = refreshControl

tableView.tableFooterView = tableViewFooter
if post?.original().isStatus(in: [.draft, .pending]) == false {
tableView.tableFooterView = tableViewFooter
}

tableView.separatorColor = .divider
WPStyleGuide.configureColors(view: view, tableView: tableView)
Expand Down Expand Up @@ -230,7 +234,11 @@ extension RevisionsTableViewController: WPTableViewHandlerDelegate {
}

override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
tableViewHandler.resultsController?.sections?[section].name
guard let sections = tableViewHandler.resultsController?.sections,
sections.indices.contains(section) else {
return nil
}
return sections[section].name
}

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
Expand Down Expand Up @@ -303,7 +311,7 @@ private extension Date {

private static let shortDateFormatter: DateFormatter = {
let formatter = DateFormatter()
formatter.dateStyle = .short
formatter.dateStyle = .medium
formatter.timeStyle = .none
return formatter
}()
Expand Down

0 comments on commit 54b6b93

Please sign in to comment.