Skip to content
Merged

Gui #3985

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Nextcloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
2C33C48223E2C475005F963B /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C33C48123E2C475005F963B /* NotificationService.swift */; };
2C33C48623E2C475005F963B /* Notification Service Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 2C33C47F23E2C475005F963B /* Notification Service Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
2F96A1BAFB10ACFEAC68EF1C /* NCContextMenuPlayerTracks.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4C7A5B36D1ED178FB6B76CB /* NCContextMenuPlayerTracks.swift */; };
370D26AF248A3D7A00121797 /* NCCellProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370D26AE248A3D7A00121797 /* NCCellProtocol.swift */; };
370D26AF248A3D7A00121797 /* NCCellMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370D26AE248A3D7A00121797 /* NCCellMain.swift */; };
A5A87F9E4B0E4441A6A4BC20 /* NCContextMenuProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB7697C94BA14450A0867940 /* NCContextMenuProfile.swift */; };
AA3C85E82D36B08C00F74F12 /* UITestBackend.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA3C85E72D36B08C00F74F12 /* UITestBackend.swift */; };
AA3C85EB2D36BBFB00F74F12 /* OCSResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA3C85EA2D36BBF400F74F12 /* OCSResponse.swift */; };
Expand Down Expand Up @@ -871,7 +871,7 @@
F7EB9B132BBC12F300EDF036 /* UIApplication+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EB9B122BBC12F300EDF036 /* UIApplication+Extension.swift */; };
F7ED547C25EEA65400956C55 /* QRCodeReader in Frameworks */ = {isa = PBXBuildFile; productRef = F7ED547B25EEA65400956C55 /* QRCodeReader */; };
F7EDE4D6262D7B9600414FE6 /* NCListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F78ACD4121903CE00088454D /* NCListCell.swift */; };
F7EDE4DB262D7BA200414FE6 /* NCCellProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370D26AE248A3D7A00121797 /* NCCellProtocol.swift */; };
F7EDE4DB262D7BA200414FE6 /* NCCellMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370D26AE248A3D7A00121797 /* NCCellMain.swift */; };
F7EDE509262DA9D600414FE6 /* NCSelectCommandViewSelect.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7EDE508262DA9D600414FE6 /* NCSelectCommandViewSelect.xib */; };
F7EDE514262DC2CD00414FE6 /* NCSelectCommandViewSelect+CreateFolder.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7EDE513262DC2CD00414FE6 /* NCSelectCommandViewSelect+CreateFolder.xib */; };
F7EDE51B262DD0C400414FE6 /* NCSelectCommandViewCopyMove.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7EDE51A262DD0C400414FE6 /* NCSelectCommandViewCopyMove.xib */; };
Expand Down Expand Up @@ -1106,7 +1106,7 @@
2C33C47F23E2C475005F963B /* Notification Service Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Notification Service Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
2C33C48123E2C475005F963B /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
2C33C48A23E2CC26005F963B /* Notification_Service_Extension-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Notification_Service_Extension-Bridging-Header.h"; sourceTree = "<group>"; };
370D26AE248A3D7A00121797 /* NCCellProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCCellProtocol.swift; sourceTree = "<group>"; };
370D26AE248A3D7A00121797 /* NCCellMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCCellMain.swift; sourceTree = "<group>"; };
8932E90EC4278026D86CCCC9 /* NCContextMenuComment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCContextMenuComment.swift; sourceTree = "<group>"; };
AA3C85E72D36B08C00F74F12 /* UITestBackend.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITestBackend.swift; sourceTree = "<group>"; };
AA3C85EA2D36BBF400F74F12 /* OCSResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OCSResponse.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2457,12 +2457,12 @@
F75FE06B2BB01D0D00A0EFEF /* Cell */ = {
isa = PBXGroup;
children = (
370D26AE248A3D7A00121797 /* NCCellProtocol.swift */,
370D26AE248A3D7A00121797 /* NCCellMain.swift */,
F78ACD4121903CE00088454D /* NCListCell.swift */,
F78ACD3F21903CC20088454D /* NCGridCell.swift */,
F751247A2C42919C00E63DB8 /* NCPhotoCell.swift */,
F78ACD4521903D010088454D /* NCGridCell.xib */,
F78ACD4121903CE00088454D /* NCListCell.swift */,
F78ACD4321903CF20088454D /* NCListCell.xib */,
F751247A2C42919C00E63DB8 /* NCPhotoCell.swift */,
F751247B2C42919C00E63DB8 /* NCPhotoCell.xib */,
F75D901E2D2BE12E003E740B /* NCRecommendationsCell.xib */,
F75D90202D2BE26C003E740B /* NCRecommendationsCell.swift */,
Expand All @@ -2475,7 +2475,6 @@
isa = PBXGroup;
children = (
F75FE06B2BB01D0D00A0EFEF /* Cell */,
F78ACD50219046AC0088454D /* Section Header Footer */,
F70D7C3525FFBF81002B9E34 /* NCCollectionViewCommon.swift */,
F7CAFE172F164B9200DB35A5 /* NCCollectionViewCommon+CellDelegate.swift */,
F7743A132C33F13A0034F670 /* NCCollectionViewCommon+CollectionViewDataSource.swift */,
Expand All @@ -2485,14 +2484,15 @@
F7D890742BD25C570050B8A6 /* NCCollectionViewCommon+DragDrop.swift */,
F799DF872C4B83CC003410B5 /* NCCollectionViewCommon+EasyTipView.swift */,
F799DF8A2C4B84EB003410B5 /* NCCollectionViewCommon+EndToEndInitialize.swift */,
F7865FF02F39D32500D09AE4 /* NCCollectionViewCommon+Search.swift */,
F7CCAB502ECF315F00F8E68B /* NCCollectionViewCommon+SyncMetadata.swift */,
F778231D2C42C07C001BB94F /* NCCollectionViewCommon+MediaLayout.swift */,
F7865FF02F39D32500D09AE4 /* NCCollectionViewCommon+Search.swift */,
F36E64F62B9245210085ABB5 /* NCCollectionViewCommon+SelectTabBarDelegate.swift */,
F7CCAB502ECF315F00F8E68B /* NCCollectionViewCommon+SyncMetadata.swift */,
F7D4BF002CA1831600A5E746 /* NCCollectionViewCommonPinchGesture.swift */,
F38F71242B6BBDC300473CDC /* NCCollectionViewCommonSelectTabBar.swift */,
F7C1EEA425053A9C00866ACC /* NCCollectionViewDataSource.swift */,
F7E7AEA42BA32C6500512E52 /* NCCollectionViewDownloadThumbnail.swift */,
F78ACD50219046AC0088454D /* Section Header Footer */,
);
path = "Collection Common";
sourceTree = "<group>";
Expand Down Expand Up @@ -4244,7 +4244,7 @@
F799DF862C4B7E56003410B5 /* NCSectionHeader.swift in Sources */,
F702F2D025EE5B5C008F8E80 /* NCGlobal.swift in Sources */,
F72437802C10B92400C7C68D /* NCSharePermissions.swift in Sources */,
F7EDE4DB262D7BA200414FE6 /* NCCellProtocol.swift in Sources */,
F7EDE4DB262D7BA200414FE6 /* NCCellMain.swift in Sources */,
F72944F62A8424F800246839 /* NCEndToEndMetadataV1.swift in Sources */,
F73EF7BA2B0224AB0087E6E9 /* NCManageDatabase+ExternalSites.swift in Sources */,
F711A4EB2AF9327D00095DD8 /* UIImage+animatedGIF.m in Sources */,
Expand Down Expand Up @@ -4414,7 +4414,7 @@
F702F30825EE5D47008F8E80 /* NCPopupViewController.swift in Sources */,
F76340FC2EBDF64D0056F538 /* NCManageDatabase+Tag.swift in Sources */,
F733598125C1C188002ABA72 /* NCAskAuthorization.swift in Sources */,
370D26AF248A3D7A00121797 /* NCCellProtocol.swift in Sources */,
370D26AF248A3D7A00121797 /* NCCellMain.swift in Sources */,
F32FADA92D1176E3007035E2 /* UIButton+Extension.swift in Sources */,
F7DF7B3F2F1A2EF900514020 /* BannerView.swift in Sources */,
F768822C2C0DD1E7001CF441 /* NCPreferences.swift in Sources */,
Expand Down Expand Up @@ -5747,7 +5747,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -5813,7 +5813,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down
4 changes: 2 additions & 2 deletions Share/NCShareExtension+DataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ extension NCShareExtension: UICollectionViewDataSource {
cell.labelTitle.textColor = NCBrandColor.shared.textColor
cell.imageSelect.image = nil
cell.imageStatus.image = nil
cell.imageLocal.image = nil
cell.imageLocal?.image = nil
cell.imageFavorite.image = nil
cell.imageShared.image = nil
cell.imageMore.image = nil
Expand Down Expand Up @@ -153,7 +153,7 @@ extension NCShareExtension: UICollectionViewDataSource {

// Local image: offline
if tableDirectory != nil && tableDirectory!.offline {
cell.imageLocal.image = NCImageCache.shared.getImageOfflineFlag()
cell.imageLocal?.image = NCImageCache.shared.getImageOfflineFlag()
}
}
}
Expand Down
1 change: 0 additions & 1 deletion iOSClient/Account/Account Request/NCShareAccounts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ extension NCShareAccounts: UITableViewDelegate {
}

extension NCShareAccounts: UITableViewDataSource {

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return accounts.count
}
Expand Down
12 changes: 6 additions & 6 deletions iOSClient/Activity/NCActivity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ extension NCActivity: UITableViewDataSource {
let results = NCManageDatabase.shared.getImageAvatarLoaded(fileName: fileName)

if results.image == nil {
cell.avatarImageView?.image = utility.loadUserImage(for: comment.actorId, displayName: comment.actorDisplayName, urlBase: NCSession.shared.getSession(account: account).urlBase)
cell.avatarImage?.image = utility.loadUserImage(for: comment.actorId, displayName: comment.actorDisplayName, urlBase: NCSession.shared.getSession(account: account).urlBase)
} else {
cell.avatarImageView?.image = results.image
cell.avatarImage?.image = results.image
}

if let tblAvatar = results.tblAvatar,
Expand Down Expand Up @@ -264,7 +264,7 @@ extension NCActivity: UITableViewDataSource {

cell.idActivity = activity.idActivity
cell.account = activity.account
cell.indexPath = indexPath
cell.index = indexPath
cell.avatar.image = nil
cell.avatar.isHidden = true
cell.didSelectItemEnable = self.didSelectItemEnable
Expand All @@ -288,17 +288,17 @@ extension NCActivity: UITableViewDataSource {
// avatar
if !activity.user.isEmpty && activity.user != session.userId {
cell.avatar.isHidden = false
cell.fileUser = activity.user
cell.user = activity.user
cell.subjectLeadingConstraint.constant = 15
cell.configureAvatarMenu()

let fileName = NCSession.shared.getFileName(urlBase: session.urlBase, user: activity.user)
let results = NCManageDatabase.shared.getImageAvatarLoaded(fileName: fileName)

if results.image == nil {
cell.avatarImageView?.image = utility.loadUserImage(for: activity.user, displayName: nil, urlBase: session.urlBase)
cell.avatar?.image = utility.loadUserImage(for: activity.user, displayName: nil, urlBase: session.urlBase)
} else {
cell.avatarImageView?.image = results.image
cell.avatar?.image = results.image
}

if !(results.tblAvatar?.loaded ?? false),
Expand Down
26 changes: 5 additions & 21 deletions iOSClient/Activity/NCActivityTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class NCActivityCollectionViewCell: UICollectionViewCell {
var indexPath = IndexPath()
}

class NCActivityTableViewCell: UITableViewCell, NCCellProtocol {
class NCActivityTableViewCell: UITableViewCell {
@IBOutlet weak var icon: UIImageView!
@IBOutlet weak var avatar: UIImageView!
@IBOutlet weak var subject: UILabel!
@IBOutlet weak var subjectLeadingConstraint: NSLayoutConstraint!

private var user: String = ""
private var index = IndexPath()
private var avatarButton: UIButton!
var user: String = ""
var index = IndexPath()
var avatarButton: UIButton!

var idActivity: Int = 0
var activityPreviews: [tableActivityPreview] = []
Expand All @@ -32,18 +32,6 @@ class NCActivityTableViewCell: UITableViewCell, NCCellProtocol {
var account: String!
let utility = NCUtility()

var indexPath: IndexPath {
get { return index }
set { index = newValue }
}
var avatarImageView: UIImageView? {
return avatar
}
var fileUser: String? {
get { return user }
set { user = newValue ?? "" }
}

override func awakeFromNib() {
super.awakeFromNib()

Expand All @@ -61,13 +49,9 @@ class NCActivityTableViewCell: UITableViewCell, NCCellProtocol {
}

func configureAvatarMenu() {
guard let fileUser = fileUser else {
avatarButton.menu = nil
return
}
let session = NCSession.shared.getSession(account: account)

avatarButton.menu = NCContextMenuProfile(userId: fileUser, session: session, viewController: viewController).viewMenu()
avatarButton.menu = NCContextMenuProfile(userId: user, session: session, viewController: viewController).viewMenu()
}
}

Expand Down
10 changes: 10 additions & 0 deletions iOSClient/Assistant/Models/NCAssistantModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class NCAssistantModel: ObservableObject {
selectedTask = task
isLoading = true

/*
if useV2 {
NextcloudKit.shared.textProcessingGetTasksV2(taskType: task.type ?? "", account: session.account, completion: { _, _, _, error in
handle(task: task, error: error)
Expand All @@ -71,6 +72,7 @@ class NCAssistantModel: ObservableObject {
handle(task: taskV2, error: error)
}
}
*/

func handle(task: AssistantTask?, error: NKError?) {
self.isLoading = false
Expand All @@ -87,6 +89,7 @@ class NCAssistantModel: ObservableObject {
func scheduleTask(input: String) {
isLoading = true

/*
if useV2 {
guard let selectedType else { return }
NextcloudKit.shared.textProcessingScheduleV2(input: input, taskType: selectedType, account: session.account) { _, task, _, error in
Expand All @@ -98,6 +101,7 @@ class NCAssistantModel: ObservableObject {
handle(task: taskV2, error: error)
}
}
*/

func handle(task: AssistantTask?, error: NKError?) {
self.isLoading = false
Expand All @@ -117,6 +121,7 @@ class NCAssistantModel: ObservableObject {
func deleteTask(_ task: AssistantTask) {
isLoading = true

/*
if useV2 {
NextcloudKit.shared.textProcessingDeleteTaskV2(taskId: task.id, account: session.account) { _, _, error in
handle(task: task, error: error)
Expand All @@ -126,6 +131,7 @@ class NCAssistantModel: ObservableObject {
handle(task: task, error: error)
}
}
*/

func handle(task: AssistantTask, error: NKError?) {
self.isLoading = false
Expand All @@ -148,6 +154,7 @@ class NCAssistantModel: ObservableObject {
private func loadAllTypes() {
isLoading = true

/*
if useV2 {
NextcloudKit.shared.textProcessingGetTypesV2(account: session.account) { _, types, _, error in
handle(types: types, error: error)
Expand All @@ -160,6 +167,7 @@ class NCAssistantModel: ObservableObject {
handle(types: typesV2, error: error)
}
}
*/

func handle(types: [TaskTypeData]?, error: NKError) {
self.isLoading = false
Expand All @@ -184,6 +192,7 @@ class NCAssistantModel: ObservableObject {
private func loadAllTasks(appId: String = "assistant", type: TaskTypeData?) {
isLoading = true

/*
if useV2 {
NextcloudKit.shared.textProcessingGetTasksV2(taskType: type?.id ?? "", account: session.account) { _, tasks, _, error in
guard let tasks = tasks?.tasks.filter({ $0.appId == "assistant" }) else { return }
Expand All @@ -195,6 +204,7 @@ class NCAssistantModel: ObservableObject {
handle(tasks: NKTextProcessingTask.toV2(tasks: tasks).tasks, error: error)
}
}
*/

func handle(tasks: [AssistantTask], error: NKError?) {
isLoading = false
Expand Down
1 change: 0 additions & 1 deletion iOSClient/GUI/Lucid Banner/BannerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -393,4 +393,3 @@ struct MessageBannerView: View {
.padding()
}
}

Loading
Loading