Skip to content

Commit

Permalink
Merge pull request #1390 from nextcloud/fix-swift-migration-issues
Browse files Browse the repository at this point in the history
Fix ChatViewController issues after migration
  • Loading branch information
Ivansss authored Oct 19, 2023
2 parents cbbcd6f + 25a3bcd commit 0d58c5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions NextcloudTalk/BaseChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ import QuickLook

private lazy var inputbarBorderView: UIView = {
let inputbarBorderView = UIView()
inputbarBorderView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
inputbarBorderView.autoresizingMask = [.flexibleWidth, .flexibleBottomMargin]
inputbarBorderView.frame = .init(x: 0, y: 0, width: self.textInputbar.frame.size.width, height: 1)
inputbarBorderView.isHidden = true
inputbarBorderView.backgroundColor = .systemGray6
Expand Down Expand Up @@ -3292,7 +3292,7 @@ extension Sequence where Iterator.Element == NCChatMessage {

func containsUserMessage() -> Bool {
let activeAccount = NCDatabaseManager.sharedInstance().activeAccount()
return self.contains(where: { $0.isSystemMessage() && $0.actorId == activeAccount.userId })
return self.contains(where: { !$0.isSystemMessage() && $0.actorId == activeAccount.userId })
}

func containsVisibleMessages() -> Bool {
Expand Down
2 changes: 1 addition & 1 deletion NextcloudTalk/InputbarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ import UIKit
public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
if self.traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection) {
// We use a CGColor so we loose the automatic color changing of dynamic colors -> update manually
self.textView.layer.borderColor = UIColor.systemGray.cgColor
self.textView.layer.borderColor = UIColor.systemGray4.cgColor
self.textView.tintColor = UIColor(cgColor: UIColor.systemBlue.cgColor)
}
}
Expand Down

0 comments on commit 0d58c5e

Please sign in to comment.