pull/646/head
ryanzhao 3 years ago
parent 1e1c5a5fde
commit 8d385de389

@ -242,18 +242,18 @@ public class DocumentTileViewController: UIViewController, UITableViewDelegate,
switch section.model { switch section.model {
case .emptyGallery, .loadOlder, .loadNewer: case .emptyGallery, .loadOlder, .loadNewer:
let headerView: DocumentStaticHeaderView = DocumentStaticHeaderView() let headerView: DocumentStaticHeaderView = DocumentStaticHeaderView()
headerView.configure( headerView.configure(
title: { title: {
switch section.model { switch section.model {
case .emptyGallery: return "DOCUMENT_TILES_EMPTY_DOCUMENT".localized() case .emptyGallery: return "DOCUMENT_TILES_EMPTY_DOCUMENT".localized()
case .loadOlder: return "DOCUMENT_TILES_LOADING_OLDER_LABEL".localized() case .loadOlder: return "DOCUMENT_TILES_LOADING_OLDER_LABEL".localized()
case .loadNewer: return "DOCUMENT_TILES_LOADING_MORE_RECENT_LABEL".localized() case .loadNewer: return "DOCUMENT_TILES_LOADING_MORE_RECENT_LABEL".localized()
case .galleryMonth: return "" // Impossible case case .galleryMonth: return "" // Impossible case
} }
}() }()
) )
return headerView return headerView
case .galleryMonth(let date): case .galleryMonth(let date):
let headerView: DocumentSectionHeaderView = DocumentSectionHeaderView() let headerView: DocumentSectionHeaderView = DocumentSectionHeaderView()

@ -267,6 +267,7 @@ public class MediaGalleryViewModel {
return SQL(""" return SQL("""
\(attachment[.isVisualMedia]) = false AND \(attachment[.isVisualMedia]) = false AND
\(attachment[.isValid]) = true AND \(attachment[.isValid]) = true AND
\(attachment[.variant]) = \(Attachment.Variant.standard) AND
\(interaction[.threadId]) = \(threadId) AND \(interaction[.threadId]) = \(threadId) AND
""") """)
} }

Loading…
Cancel
Save