Skip to content

Commit 67e48fc

Browse files
committed
Force HTML update when color changes to force rerender of images.
1 parent 1f4bb5f commit 67e48fc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Aztec/Classes/TextKit/TextView.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,13 @@ open class TextView: UITextView {
303303
}
304304
}
305305

306-
306+
public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
307+
if #available(iOS 13.0, *) {
308+
if let previous = previousTraitCollection, previous.hasDifferentColorAppearance(comparedTo: traitCollection) {
309+
self.setHTML(self.getHTML())
310+
}
311+
}
312+
}
307313
/// Blockquote Blocks Background Width.
308314
///
309315
@objc dynamic public var blockquoteBorderWidth: CGFloat {

0 commit comments

Comments
 (0)