diff --git a/NextcloudTalk/BaseChatTableViewCell+File.swift b/NextcloudTalk/BaseChatTableViewCell+File.swift index 907f4c536..74ad8b7e0 100644 --- a/NextcloudTalk/BaseChatTableViewCell+File.swift +++ b/NextcloudTalk/BaseChatTableViewCell+File.swift @@ -287,6 +287,7 @@ extension BaseChatTableViewCell { } fileActivityIndicator.startAnimating() + fileActivityIndicator.heightAnchor.constraint(equalToConstant: 20).isActive = true self.statusView.addArrangedSubview(fileActivityIndicator) } diff --git a/NextcloudTalk/BaseChatTableViewCell.swift b/NextcloudTalk/BaseChatTableViewCell.swift index a3cae5253..0f477891c 100644 --- a/NextcloudTalk/BaseChatTableViewCell.swift +++ b/NextcloudTalk/BaseChatTableViewCell.swift @@ -298,31 +298,40 @@ class BaseChatTableViewCell: UITableViewCell, ReactionsViewDelegate { if deliveryState == ChatMessageDeliveryStateSending || deliveryState == ChatMessageDeliveryStateDeleting { let activityIndicator = MDCActivityIndicator(frame: .init(x: 0, y: 0, width: 20, height: 20)) + activityIndicator.radius = 7.0 - activityIndicator.cycleColors = [.lightGray] + activityIndicator.cycleColors = [.systemGray2] activityIndicator.startAnimating() + activityIndicator.heightAnchor.constraint(equalToConstant: 20).isActive = true + self.statusView.addArrangedSubview(activityIndicator) + } else if deliveryState == ChatMessageDeliveryStateFailed { let errorView = UIImageView(frame: .init(x: 0, y: 0, width: 20, height: 20)) let errorImage = UIImage(systemName: "exclamationmark.circle")?.withTintColor(.red).withRenderingMode(.alwaysOriginal) + errorView.image = errorImage + errorView.heightAnchor.constraint(equalToConstant: 20).isActive = true + self.statusView.addArrangedSubview(errorView) - } else if deliveryState == ChatMessageDeliveryStateSent { + + } else if deliveryState == ChatMessageDeliveryStateSent || deliveryState == ChatMessageDeliveryStateRead { + var checkImageName = "check" + + if deliveryState == ChatMessageDeliveryStateRead { + checkImageName = "check-all" + } + + let checkImage = UIImage(named: checkImageName)?.withRenderingMode(.alwaysTemplate) let checkView = UIImageView(frame: .init(x: 0, y: 0, width: 20, height: 20)) - let checkImage = UIImage(named: "check")?.withRenderingMode(.alwaysTemplate) + checkView.image = checkImage checkView.contentMode = .scaleAspectFit checkView.tintColor = .systemGray2 checkView.accessibilityIdentifier = "MessageSent" + checkView.heightAnchor.constraint(equalToConstant: 20).isActive = true + self.statusView.addArrangedSubview(checkView) - } else if deliveryState == ChatMessageDeliveryStateRead { - let checkAllView = UIImageView(frame: .init(x: 0, y: 0, width: 20, height: 20)) - let checkAllImage = UIImage(named: "check-all")?.withRenderingMode(.alwaysTemplate) - checkAllView.image = checkAllImage - checkAllView.contentMode = .scaleAspectFit - checkAllView.tintColor = .systemGray2 - checkAllView.accessibilityIdentifier = "MessageSent" - self.statusView.addArrangedSubview(checkAllView) } } diff --git a/NextcloudTalk/BaseChatTableViewCell.xib b/NextcloudTalk/BaseChatTableViewCell.xib index 87d889834..41f41f612 100644 --- a/NextcloudTalk/BaseChatTableViewCell.xib +++ b/NextcloudTalk/BaseChatTableViewCell.xib @@ -70,7 +70,7 @@ - +