Skip to content

Commit 8fa571c

Browse files
committed
fix: Only update title view on color or size change
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
1 parent 85a21a7 commit 8fa571c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

NextcloudTalk/Chat/InputbarViewController.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,12 @@ import UIKit
182182
// We use a CGColor so we loose the automatic color changing of dynamic colors -> update manually
183183
self.textView.layer.borderColor = UIColor.systemGray4.cgColor
184184
self.textView.tintColor = UIColor(cgColor: UIColor.systemBlue.cgColor)
185-
}
186185

187-
self.setTitleView()
186+
self.setTitleView()
187+
} else if previousTraitCollection?.horizontalSizeClass != self.traitCollection.horizontalSizeClass || previousTraitCollection?.verticalSizeClass != self.traitCollection.verticalSizeClass {
188+
// When the size class changes, we want to update the title view (e.g. to show/hide subtitle)
189+
self.setTitleView()
190+
}
188191
}
189192

190193
// MARK: - Configuration

0 commit comments

Comments
 (0)