swiftformat now enforces newlines for ifs

This commit is contained in:
Mauro Romito
2026-06-19 13:46:46 +02:00
committed by Mauro
parent f32b9eeb26
commit 3aedd0ccff
17 changed files with 87 additions and 29 deletions
@@ -286,7 +286,9 @@ struct TimelineState {
/// value to ``itemsDictionary``.
mutating func recomputeReadMarkerUniqueID() {
readMarkerUniqueID = itemsDictionary.first { _, viewState in
if case .readMarker = viewState.type { return true }
if case .readMarker = viewState.type {
return true
}
return false
}?.key
}
@@ -103,7 +103,9 @@ class TimelineTableViewController: UIViewController {
var isLive = true {
didSet {
// Update isScrolledToBottom when switching back to a live timeline.
if isLive { scrollViewDidScroll(tableView) }
if isLive {
scrollViewDidScroll(tableView)
}
}
}
@@ -113,7 +113,11 @@ struct TimelineItemMenuActionProvider {
}
if canRedactItem(item) {
let isMedia = if case .media = timelineKind { true } else { false }
let isMedia = if case .media = timelineKind {
true
} else {
false
}
secondaryActions.append(.redact(isMedia: isMedia))
}