Skip to content

Commit

Permalink
Minor performance improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Kazaev committed Oct 5, 2022
1 parent 11ba803 commit 2b13a31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ChatLayout/Classes/Core/Model/StateController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ final class StateController<Layout: ChatLayoutRepresentation> {
let locationHeight: CGFloat?
switch state {
case .beforeUpdate:
locationHeight = layoutBeforeUpdate.sections.withUnsafeBufferPointer({ $0.last?.locationHeight })
locationHeight = layoutBeforeUpdate.sections.withUnsafeBufferPointer { $0.last?.locationHeight }
case .afterUpdate:
locationHeight = layoutAfterUpdate?.sections.withUnsafeBufferPointer({ $0.last?.locationHeight })
locationHeight = layoutAfterUpdate?.sections.withUnsafeBufferPointer { $0.last?.locationHeight }
}

guard let locationHeight = locationHeight else {
Expand Down

0 comments on commit 2b13a31

Please sign in to comment.