Skip to content

Commit

Permalink
Fixed missing dispose bag (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalrentka authored Oct 20, 2023
1 parent d7344be commit e8c08e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class AnnotationView: UIView {
private var tags: AnnotationViewText!
private var scrollView: UIScrollView?
private var scrollViewContent: UIView?
private(set) var disposeBag: CompositeDisposable!
private(set) var disposeBag: CompositeDisposable?

var tagString: String? {
return self.tags.textLabel.text
Expand Down
4 changes: 2 additions & 2 deletions Zotero/Scenes/Detail/PDF/Views/AnnotationCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class AnnotationCell: UITableViewCell {
var actionPublisher: PublishSubject<AnnotationView.Action> {
return self.annotationView.actionPublisher
}
var disposeBag: CompositeDisposable {
var disposeBag: CompositeDisposable? {
return self.annotationView.disposeBag
}

Expand All @@ -37,7 +37,7 @@ final class AnnotationCell: UITableViewCell {
override func prepareForReuse() {
super.prepareForReuse()
self.key = ""
disposeBag.dispose()
disposeBag?.dispose()
}

// MARK: - Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ final class AnnotationsViewController: UIViewController {
let actionSubscription = cell.actionPublisher.subscribe(onNext: { [weak self] action in
self?.perform(action: action, annotation: annotation)
})
_ = cell.disposeBag.insert(actionSubscription)
_ = cell.disposeBag?.insert(actionSubscription)
}

private func loadAttributedComment(for annotation: Annotation) -> NSAttributedString? {
Expand Down

0 comments on commit e8c08e6

Please sign in to comment.