From 8d385de389cc42d8e2d40bcd81d837a97cb7f1e3 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Mon, 11 Jul 2022 11:31:42 +1000 Subject: [PATCH] clean --- .../DocumentTitleViewController.swift | 24 +++++++++---------- .../MediaGalleryViewModel.swift | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Session/Media Viewing & Editing/DocumentTitleViewController.swift b/Session/Media Viewing & Editing/DocumentTitleViewController.swift index 7c59d63d5..21227646b 100644 --- a/Session/Media Viewing & Editing/DocumentTitleViewController.swift +++ b/Session/Media Viewing & Editing/DocumentTitleViewController.swift @@ -242,18 +242,18 @@ public class DocumentTileViewController: UIViewController, UITableViewDelegate, switch section.model { case .emptyGallery, .loadOlder, .loadNewer: - let headerView: DocumentStaticHeaderView = DocumentStaticHeaderView() - headerView.configure( - title: { - switch section.model { - case .emptyGallery: return "DOCUMENT_TILES_EMPTY_DOCUMENT".localized() - case .loadOlder: return "DOCUMENT_TILES_LOADING_OLDER_LABEL".localized() - case .loadNewer: return "DOCUMENT_TILES_LOADING_MORE_RECENT_LABEL".localized() - case .galleryMonth: return "" // Impossible case - } - }() - ) - return headerView + let headerView: DocumentStaticHeaderView = DocumentStaticHeaderView() + headerView.configure( + title: { + switch section.model { + case .emptyGallery: return "DOCUMENT_TILES_EMPTY_DOCUMENT".localized() + case .loadOlder: return "DOCUMENT_TILES_LOADING_OLDER_LABEL".localized() + case .loadNewer: return "DOCUMENT_TILES_LOADING_MORE_RECENT_LABEL".localized() + case .galleryMonth: return "" // Impossible case + } + }() + ) + return headerView case .galleryMonth(let date): let headerView: DocumentSectionHeaderView = DocumentSectionHeaderView() diff --git a/Session/Media Viewing & Editing/MediaGalleryViewModel.swift b/Session/Media Viewing & Editing/MediaGalleryViewModel.swift index 52f183451..9a454597d 100644 --- a/Session/Media Viewing & Editing/MediaGalleryViewModel.swift +++ b/Session/Media Viewing & Editing/MediaGalleryViewModel.swift @@ -267,6 +267,7 @@ public class MediaGalleryViewModel { return SQL(""" \(attachment[.isVisualMedia]) = false AND \(attachment[.isValid]) = true AND + \(attachment[.variant]) = \(Attachment.Variant.standard) AND \(interaction[.threadId]) = \(threadId) AND """) }