|
@@ -54,6 +54,27 @@ extension NCMedia {
|
|
|
|
|
|
actions.append(.seperator(order: 0))
|
|
|
|
|
|
+ actions.append(
|
|
|
+ NCMenuAction(
|
|
|
+ title: NSLocalizedString("_select_media_folder_", comment: ""),
|
|
|
+ icon: utility.loadImage(named: "folder"),
|
|
|
+ action: { _ in
|
|
|
+ if let navigationController = UIStoryboard(name: "NCSelect", bundle: nil).instantiateInitialViewController() as? UINavigationController,
|
|
|
+ let viewController = navigationController.topViewController as? NCSelect {
|
|
|
+
|
|
|
+ viewController.delegate = self
|
|
|
+ viewController.typeOfCommandView = .select
|
|
|
+ viewController.type = "mediaFolder"
|
|
|
+ viewController.selectIndexPath = self.selectIndexPath
|
|
|
+
|
|
|
+ self.present(navigationController, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ )
|
|
|
+
|
|
|
+ actions.append(.seperator(order: 0))
|
|
|
+
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_media_viewimage_show_", comment: ""),
|
|
@@ -63,7 +84,7 @@ extension NCMedia {
|
|
|
action: { _ in
|
|
|
self.showOnlyImages = true
|
|
|
self.showOnlyVideos = false
|
|
|
- self.reloadDataSourceWithCompletion { _ in }
|
|
|
+ self.reloadDataSource { }
|
|
|
}
|
|
|
)
|
|
|
)
|
|
@@ -77,7 +98,7 @@ extension NCMedia {
|
|
|
action: { _ in
|
|
|
self.showOnlyImages = false
|
|
|
self.showOnlyVideos = true
|
|
|
- self.reloadDataSourceWithCompletion { _ in }
|
|
|
+ self.reloadDataSource { }
|
|
|
}
|
|
|
)
|
|
|
)
|
|
@@ -91,28 +112,7 @@ extension NCMedia {
|
|
|
action: { _ in
|
|
|
self.showOnlyImages = false
|
|
|
self.showOnlyVideos = false
|
|
|
- self.reloadDataSourceWithCompletion { _ in }
|
|
|
- }
|
|
|
- )
|
|
|
- )
|
|
|
-
|
|
|
- actions.append(.seperator(order: 0))
|
|
|
-
|
|
|
- actions.append(
|
|
|
- NCMenuAction(
|
|
|
- title: NSLocalizedString("_select_media_folder_", comment: ""),
|
|
|
- icon: utility.loadImage(named: "folder"),
|
|
|
- action: { _ in
|
|
|
- if let navigationController = UIStoryboard(name: "NCSelect", bundle: nil).instantiateInitialViewController() as? UINavigationController,
|
|
|
- let viewController = navigationController.topViewController as? NCSelect {
|
|
|
-
|
|
|
- viewController.delegate = self
|
|
|
- viewController.typeOfCommandView = .select
|
|
|
- viewController.type = "mediaFolder"
|
|
|
- viewController.selectIndexPath = self.selectIndexPath
|
|
|
-
|
|
|
- self.present(navigationController, animated: true, completion: nil)
|
|
|
- }
|
|
|
+ self.reloadDataSource { }
|
|
|
}
|
|
|
)
|
|
|
)
|
|
@@ -158,47 +158,6 @@ extension NCMedia {
|
|
|
)
|
|
|
)
|
|
|
|
|
|
- actions.append(.seperator(order: 0))
|
|
|
-
|
|
|
- actions.append(
|
|
|
- NCMenuAction(
|
|
|
- title: NSLocalizedString("_media_by_modified_date_", comment: ""),
|
|
|
- icon: utility.loadImage(named: "circle.grid.cross.up.fill"),
|
|
|
- selected: NCKeychain().mediaSortDate == "date",
|
|
|
- on: true,
|
|
|
- action: { _ in
|
|
|
- NCKeychain().mediaSortDate = "date"
|
|
|
- self.reloadDataSourceWithCompletion { _ in }
|
|
|
- }
|
|
|
- )
|
|
|
- )
|
|
|
-
|
|
|
- actions.append(
|
|
|
- NCMenuAction(
|
|
|
- title: NSLocalizedString("_media_by_created_date_", comment: ""),
|
|
|
- icon: utility.loadImage(named: "circle.grid.cross.down.fill"),
|
|
|
- selected: NCKeychain().mediaSortDate == "creationDate",
|
|
|
- on: true,
|
|
|
- action: { _ in
|
|
|
- NCKeychain().mediaSortDate = "creationDate"
|
|
|
- self.reloadDataSourceWithCompletion { _ in }
|
|
|
- }
|
|
|
- )
|
|
|
- )
|
|
|
-
|
|
|
- actions.append(
|
|
|
- NCMenuAction(
|
|
|
- title: NSLocalizedString("_media_by_upload_date_", comment: ""),
|
|
|
- icon: utility.loadImage(named: "circle.grid.cross.right.fill"),
|
|
|
- selected: NCKeychain().mediaSortDate == "uploadDate",
|
|
|
- on: true,
|
|
|
- action: { _ in
|
|
|
- NCKeychain().mediaSortDate = "uploadDate"
|
|
|
- self.reloadDataSourceWithCompletion { _ in }
|
|
|
- }
|
|
|
- )
|
|
|
- )
|
|
|
-
|
|
|
} else {
|
|
|
|
|
|
//
|