Skip to content

Commit

Permalink
Code style fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sein <[email protected]>
  • Loading branch information
Ivansss committed Apr 9, 2024
1 parent cb7d64a commit 4fdda55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion NextcloudTalk/BaseChatTableViewCell+File.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension BaseChatTableViewCell {
self.filePreviewImageView = filePreviewImageView

filePreviewImageView.translatesAutoresizingMaskIntoConstraints = false
filePreviewImageView.layer.cornerRadius = fileMessageCellFilePreviewCornerRadius
filePreviewImageView.layer.cornerRadius = chatMessageCellPreviewCornerRadius
filePreviewImageView.layer.masksToBounds = true
filePreviewImageView.contentMode = .scaleAspectFit

Expand Down
8 changes: 3 additions & 5 deletions NextcloudTalk/BaseChatTableViewCell+Location.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension BaseChatTableViewCell {
self.locationPreviewImageView = locationPreviewImageView

locationPreviewImageView.translatesAutoresizingMaskIntoConstraints = false
locationPreviewImageView.layer.cornerRadius = fileMessageCellFilePreviewCornerRadius
locationPreviewImageView.layer.cornerRadius = chatMessageCellPreviewCornerRadius
locationPreviewImageView.layer.masksToBounds = true
locationPreviewImageView.contentMode = .scaleAspectFit

Expand Down Expand Up @@ -65,10 +65,8 @@ extension BaseChatTableViewCell {
}

guard let locationPreviewImageView = self.locationPreviewImageView,
let messageTextView = self.messageTextView
else { return }

guard let geoLocationRichObject = message.geoLocation()
let messageTextView = self.messageTextView,
let geoLocationRichObject = message.geoLocation()
else { return }

let geoLocation = GeoLocationRichObject(from: geoLocationRichObject)
Expand Down
4 changes: 3 additions & 1 deletion NextcloudTalk/BaseChatTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ protocol BaseChatTableViewCellDelegate: AnyObject {
func cellWants(toOpenLocation geoLocationRichObject: GeoLocationRichObject)
}

// Common elements
public let chatMessageCellPreviewCornerRadius = 4.0

// Message cell
public let chatMessageCellIdentifier = "chatMessageCellIdentifier"
public let chatGroupedMessageCellIdentifier = "chatGroupedMessageCellIdentifier"
Expand All @@ -49,7 +52,6 @@ public let fileMessageCellFileMaxPreviewHeight = 120.0
public let fileMessageCellFileMaxPreviewWidth = 230.0
public let fileMessageCellMediaFilePreviewHeight = 230.0
public let fileMessageCellMediaFileMaxPreviewWidth = 230.0
public let fileMessageCellFilePreviewCornerRadius = 4.0
public let fileMessageCellVideoPlayIconSize = 48.0

// Location cell
Expand Down

0 comments on commit 4fdda55

Please sign in to comment.