зеркало из https://github.com/nextcloud/ios.git
Affects #2845: Reveal found calendar events and contacts in the web user interface.
This commit is contained in:
Родитель
aeb97b0d30
Коммит
8c1b7bbd2d
|
@ -28,9 +28,14 @@ import NextcloudKit
|
|||
extension NCCollectionViewCommon: UICollectionViewDelegate {
|
||||
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||
guard let metadata = self.dataSource.getMetadata(indexPath: indexPath),
|
||||
!metadata.isInvalidated,
|
||||
(metadata.name == global.appName || metadata.name == NCGlobal.shared.talkName)
|
||||
else { return }
|
||||
!metadata.isInvalidated
|
||||
else {
|
||||
return
|
||||
}
|
||||
|
||||
guard [global.appName, global.calendarName, global.contactsName, global.talkName].contains(metadata.name) else {
|
||||
return
|
||||
}
|
||||
|
||||
if isEditMode {
|
||||
if let index = fileSelect.firstIndex(of: metadata.ocId) {
|
||||
|
@ -57,6 +62,10 @@ extension NCCollectionViewCommon: UICollectionViewDelegate {
|
|||
}
|
||||
}
|
||||
|
||||
if [global.calendarName, global.contactsName].contains(metadata.name) {
|
||||
NCViewer().view(viewController: self, metadata: metadata, image: nil)
|
||||
}
|
||||
|
||||
if metadata.directory {
|
||||
pushMetadata(metadata)
|
||||
} else {
|
||||
|
|
|
@ -52,6 +52,8 @@ class NCGlobal: NSObject {
|
|||
//
|
||||
let appName = "files"
|
||||
let appScheme = "nextcloud"
|
||||
let calendarName = "calendar"
|
||||
let contactsName = "contacts"
|
||||
let talkName = "talk-message"
|
||||
let spreedName = "spreed"
|
||||
let twoFactorNotificatioName = "twofactor_nextcloud_notification"
|
||||
|
|
Загрузка…
Ссылка в новой задаче