From 6433d3ff8c672555585e790c4d748ca4f7cbbc6a Mon Sep 17 00:00:00 2001 From: Miltiadis Vasilakis Date: Sat, 10 Aug 2024 13:06:20 +0300 Subject: [PATCH] Improve code --- .../Annotation Popover/Views/TextContentEditCell.swift | 4 ++-- .../ItemDetail/Views/ItemDetailTitleContentView.swift | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Zotero/Scenes/Detail/Annotation Popover/Views/TextContentEditCell.swift b/Zotero/Scenes/Detail/Annotation Popover/Views/TextContentEditCell.swift index 3bbacfdc7..849b12119 100644 --- a/Zotero/Scenes/Detail/Annotation Popover/Views/TextContentEditCell.swift +++ b/Zotero/Scenes/Detail/Annotation Popover/Views/TextContentEditCell.swift @@ -13,8 +13,8 @@ import RxSwift final class TextContentEditCell: RxTableViewCell { let attributedTextAndHeightReloadNeededObservable: PublishSubject<(NSAttributedString, Bool)> - private var lineView: UIView? - private var textView: FormattedTextView? + private weak var lineView: UIView? + private weak var textView: FormattedTextView? override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { attributedTextAndHeightReloadNeededObservable = PublishSubject() diff --git a/Zotero/Scenes/Detail/ItemDetail/Views/ItemDetailTitleContentView.swift b/Zotero/Scenes/Detail/ItemDetail/Views/ItemDetailTitleContentView.swift index 53fd516e0..5c7f56139 100644 --- a/Zotero/Scenes/Detail/ItemDetail/Views/ItemDetailTitleContentView.swift +++ b/Zotero/Scenes/Detail/ItemDetail/Views/ItemDetailTitleContentView.swift @@ -10,10 +10,10 @@ import UIKit import RxSwift final class ItemDetailTitleContentView: UIView { - private var textView: FormattedTextView! - private var topConstraint: NSLayoutConstraint! - private var bottomConstraint: NSLayoutConstraint! - private var separatorHeight: NSLayoutConstraint! + private weak var textView: FormattedTextView! + private weak var topConstraint: NSLayoutConstraint! + private weak var bottomConstraint: NSLayoutConstraint! + private weak var separatorHeight: NSLayoutConstraint! var attributedTextObservable: Observable { textView.attributedTextObservable