Skip to content

Commit

Permalink
Code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michalrentka committed Jan 29, 2024
1 parent 7083fb1 commit 5c7c005
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Zotero/Scenes/Detail/PDF/Views/AnnotationCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ final class AnnotationCell: UITableViewCell {
key = annotation.key
selectionView.layer.borderWidth = selected ? PDFReaderLayout.cellSelectionLineWidth : 0
let availableWidth = availableWidth - (PDFReaderLayout.annotationLayout.horizontalInset * 2)
self.annotationView.setup(
annotationView.setup(
with: annotation,
comment: comment,
selected: selected,
Expand All @@ -109,7 +109,7 @@ final class AnnotationCell: UITableViewCell {
currentUserId: currentUserId
)

self.setupAccessibility(
setupAccessibility(
isAuthor: annotation.isAuthor,
authorName: annotation.author,
type: annotation.type,
Expand All @@ -136,13 +136,13 @@ final class AnnotationCell: UITableViewCell {
state: PDFReaderState
) {
if !selected {
self.annotationView.resignFirstResponder()
annotationView.resignFirstResponder()
}

self.key = annotation.key
self.selectionView.layer.borderWidth = selected ? PDFReaderLayout.cellSelectionLineWidth : 0
key = annotation.key
selectionView.layer.borderWidth = selected ? PDFReaderLayout.cellSelectionLineWidth : 0
let availableWidth = availableWidth - (PDFReaderLayout.annotationLayout.horizontalInset * 2)
self.annotationView.setup(
annotationView.setup(
with: annotation,
comment: comment,
preview: preview,
Expand All @@ -157,7 +157,7 @@ final class AnnotationCell: UITableViewCell {
state: state
)

self.setupAccessibility(
setupAccessibility(
isAuthor: annotation.isAuthor(currentUserId: currentUserId),
authorName: annotation.author(displayName: displayName, username: username),
type: annotation.type,
Expand All @@ -170,7 +170,7 @@ final class AnnotationCell: UITableViewCell {

private func setupAccessibility(isAuthor: Bool, authorName: String, type: AnnotationType, pageLabel: String, text: String?, comment: String, selected: Bool) {
let author = isAuthor ? nil : authorName
var label = self.accessibilityLabel(for: type, pageLabel: pageLabel, author: author)
var label = accessibilityLabel(for: type, pageLabel: pageLabel, author: author)
if let text {
label += ", " + L10n.Accessibility.Pdf.highlightedText + ": " + text
}
Expand Down

0 comments on commit 5c7c005

Please sign in to comment.