Эх сурвалжийг харах

rename DocumentGalleryController.swift to FilesViewController

B. Petersen 2 жил өмнө
parent
commit
d1da2ad8b6

+ 4 - 4
deltachat-ios.xcodeproj/project.pbxproj

@@ -164,7 +164,7 @@
 		AE1988AB23EB3C7600B4CD5F /* Assets in Resources */ = {isa = PBXBuildFile; fileRef = AE1988AA23EB3C7600B4CD5F /* Assets */; };
 		AE25F09022807AD800CDEA66 /* AvatarSelectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE25F08F22807AD800CDEA66 /* AvatarSelectionCell.swift */; };
 		AE38B31822672DFC00EC37A1 /* ActionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE38B31722672DFC00EC37A1 /* ActionCell.swift */; };
-		AE39D323249CFC1A007346A1 /* DocumentGalleryController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE39D322249CFC1A007346A1 /* DocumentGalleryController.swift */; };
+		AE39D323249CFC1A007346A1 /* FilesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE39D322249CFC1A007346A1 /* FilesViewController.swift */; };
 		AE4AEE3522B1030D000AA495 /* PreviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE4AEE3422B1030D000AA495 /* PreviewController.swift */; };
 		AE52EA19229EB53C00C586C9 /* ContactDetailHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE52EA18229EB53C00C586C9 /* ContactDetailHeader.swift */; };
 		AE52EA20229EB9F000C586C9 /* EditGroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE52EA1F229EB9F000C586C9 /* EditGroupViewController.swift */; };
@@ -456,7 +456,7 @@
 		AE1988AA23EB3C7600B4CD5F /* Assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Assets; sourceTree = "<group>"; };
 		AE25F08F22807AD800CDEA66 /* AvatarSelectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvatarSelectionCell.swift; sourceTree = "<group>"; };
 		AE38B31722672DFC00EC37A1 /* ActionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionCell.swift; sourceTree = "<group>"; };
-		AE39D322249CFC1A007346A1 /* DocumentGalleryController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentGalleryController.swift; sourceTree = "<group>"; };
+		AE39D322249CFC1A007346A1 /* FilesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesViewController.swift; sourceTree = "<group>"; };
 		AE4AEE3422B1030D000AA495 /* PreviewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewController.swift; sourceTree = "<group>"; };
 		AE52EA18229EB53C00C586C9 /* ContactDetailHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactDetailHeader.swift; sourceTree = "<group>"; };
 		AE52EA1F229EB9F000C586C9 /* EditGroupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditGroupViewController.swift; sourceTree = "<group>"; };
@@ -979,7 +979,7 @@
 				AE8F503424753DFE007FEE0B /* GalleryViewController.swift */,
 				30238CFA28A501C300EF14AC /* WebxdcSelector.swift */,
 				AED423D2249F578B00B6B2BB /* AddGroupMembersViewController.swift */,
-				AE39D322249CFC1A007346A1 /* DocumentGalleryController.swift */,
+				AE39D322249CFC1A007346A1 /* FilesViewController.swift */,
 				AE57C083255310BB003CFE70 /* ContextMenuController.swift */,
 				30DED712292EE4280040835D /* LogViewController.swift */,
 			);
@@ -1477,7 +1477,7 @@
 				AE52EA20229EB9F000C586C9 /* EditGroupViewController.swift in Sources */,
 				AE18F294228C602A0007B1BE /* SecuritySettingsController.swift in Sources */,
 				30C2BFFE27032375005505DA /* ChatSearchAccessoryBar.swift in Sources */,
-				AE39D323249CFC1A007346A1 /* DocumentGalleryController.swift in Sources */,
+				AE39D323249CFC1A007346A1 /* FilesViewController.swift in Sources */,
 				AE8DD451249D1DFB009A4BC1 /* DocumentGalleryFileCell.swift in Sources */,
 				3095A351237DD1F700AB07F7 /* MediaPicker.swift in Sources */,
 				B21005DB23383664004C70C5 /* EmailOptionsViewController.swift in Sources */,

+ 4 - 4
deltachat-ios/Controller/AllMediaViewController.swift

@@ -72,21 +72,21 @@ class AllMediaViewController: UIPageViewController {
 
     private func makeFilesViewController() -> UIViewController {
         let allMedia = dcContext.getChatMedia(chatId: 0, messageType: DC_MSG_FILE, messageType2: DC_MSG_AUDIO, messageType3: DC_MSG_WEBXDC)
-        return DocumentGalleryController(context: dcContext, chatId: 0, fileMessageIds: allMedia.reversed(), hasWebxdc: false)
+        return FilesViewController(context: dcContext, chatId: 0, fileMessageIds: allMedia.reversed(), hasWebxdc: false)
     }
 }
 
 // MARK: - UIPageViewControllerDataSource, UIPageViewControllerDelegate
 extension AllMediaViewController: UIPageViewControllerDataSource, UIPageViewControllerDelegate {
     func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? {
-        if viewController is DocumentGalleryController {
+        if viewController is FilesViewController {
             return nil
         }
         return makeFilesViewController()
     }
 
     func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? {
-        if viewController is DocumentGalleryController {
+        if viewController is FilesViewController {
             return makeGalleryViewController()
         }
         return nil
@@ -94,7 +94,7 @@ extension AllMediaViewController: UIPageViewControllerDataSource, UIPageViewCont
 
     func pageViewController(_ pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [UIViewController], transitionCompleted completed: Bool) {
         if completed {
-            if previousViewControllers.first is DocumentGalleryController {
+            if previousViewControllers.first is FilesViewController {
                 segmentControl.selectedSegmentIndex = 1
             } else {
                 segmentControl.selectedSegmentIndex = 0

+ 1 - 1
deltachat-ios/Controller/ContactDetailViewController.swift

@@ -470,7 +470,7 @@ class ContactDetailViewController: UITableViewController {
 
     private func showDocuments() {
         let messageIds: [Int] = viewModel.documentItemMessageIds.reversed()
-        let fileGalleryController = DocumentGalleryController(context: viewModel.context, chatId: viewModel.chatId, fileMessageIds: messageIds, hasWebxdc: viewModel.hasWebxdc)
+        let fileGalleryController = FilesViewController(context: viewModel.context, chatId: viewModel.chatId, fileMessageIds: messageIds, hasWebxdc: viewModel.hasWebxdc)
         navigationController?.pushViewController(fileGalleryController, animated: true)
     }
 

+ 3 - 3
deltachat-ios/Controller/DocumentGalleryController.swift → deltachat-ios/Controller/FilesViewController.swift

@@ -2,7 +2,7 @@ import UIKit
 import DcCore
 import LinkPresentation
 
-class DocumentGalleryController: UIViewController {
+class FilesViewController: UIViewController {
 
     private var fileMessageIds: [Int]
     private let dcContext: DcContext
@@ -126,7 +126,7 @@ class DocumentGalleryController: UIViewController {
 }
 
 // MARK: - UITableViewDelegate, UITableViewDataSource
-extension DocumentGalleryController: UITableViewDelegate, UITableViewDataSource {
+extension FilesViewController: UITableViewDelegate, UITableViewDataSource {
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
         return fileMessageIds.count
     }
@@ -188,7 +188,7 @@ extension DocumentGalleryController: UITableViewDelegate, UITableViewDataSource
 }
 
 // MARK: - coordinator
-extension DocumentGalleryController {
+extension FilesViewController {
     func showPreview(msgId: Int) {
         guard let index = fileMessageIds.index(of: msgId) else {
             return

+ 1 - 1
deltachat-ios/Controller/GroupChatDetailViewController.swift

@@ -434,7 +434,7 @@ class GroupChatDetailViewController: UIViewController {
 
     private func showDocuments() {
         let messageIds: [Int] = documentItemMessageIds.reversed()
-        let fileGalleryController = DocumentGalleryController(context: dcContext, chatId: chatId, fileMessageIds: messageIds, hasWebxdc: hasWebxdc)
+        let fileGalleryController = FilesViewController(context: dcContext, chatId: chatId, fileMessageIds: messageIds, hasWebxdc: hasWebxdc)
         navigationController?.pushViewController(fileGalleryController, animated: true)    }
 
     private func showGallery() {