Skip to content

Commit

Permalink
Merge branch 'milestone/12.2' into feature/privacy-manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schwarz committed Apr 24, 2024
2 parents d9613fa + 9964556 commit c4722e5
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ios-sdk
5 changes: 5 additions & 0 deletions ownCloud.xcodeproj/xcshareddata/xcschemes/ownCloud.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,11 @@
value = "false"
isEnabled = "NO">
</EnvironmentVariable>
<EnvironmentVariable
key = "oc:http.traffic-log-format"
value = "string:plain"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "oc:authentication-oauth2.omit-authorization-parameters"
value = "[user,login_hint]"
Expand Down
2 changes: 1 addition & 1 deletion ownCloudAppShared/Client/Actions/Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class ActionExtension: OCExtension {

public extension OCItem {
func isSharedWithUser(in context: ClientContext?) -> Bool {
if let context, let core = context.core, core.useDrives, let driveID, let drive = core.drive(withIdentifier: driveID) {
if let context, let core = context.core, core.useDrives, let driveID, let drive = core.drive(withIdentifier: driveID, attachedOnly: true) {
// On drive-based instances, all items shared with the user are located in the Shares Jail
if drive.specialType == .shares {
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension OCItemPolicy: UniversalItemListCellContentProvider {
content.icon = isFile ? .file : ((location?.isDriveRoot == true) ? .drive : .folder)

// Title
if location?.isDriveRoot == true, let driveID = location?.driveID, let drive = context?.core?.drive(withIdentifier: driveID), let driveName = drive.name {
if location?.isDriveRoot == true, let driveID = location?.driveID, let drive = context?.core?.drive(withIdentifier: driveID, attachedOnly: false), let driveName = drive.name {
content.title = .drive(name: driveName)
} else if let name = location?.lastPathComponent {
content.title = isFile ? .file(name: name) : .folder(name: name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extension OCShare: UniversalItemListCellContentProvider {

// Title
if !showManagementView {
if itemLocation.isDriveRoot, let driveID = itemLocation.driveID, let drive = context?.core?.drive(withIdentifier: driveID), let driveName = drive.name {
if itemLocation.isDriveRoot, let driveID = itemLocation.driveID, let drive = context?.core?.drive(withIdentifier: driveID, attachedOnly: false), let driveName = drive.name {
content.title = .drive(name: driveName)
} else if let name = itemLocation.lastPathComponent {
content.title = isFile ? .file(name: name) : .folder(name: name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extension OCLocation : DataItemSelectionInteraction {
public func customizedOpenItem(from viewController: UIViewController?, with context: ClientContext?, animated: Bool, pushViewController: Bool, customizeViewController: ((ClientItemViewController) -> Void)?, completion: ((Bool) -> Void)?) -> UIViewController? {
let driveContext = ClientContext(with: context, modifier: { context in
if let driveID = self.driveID, let core = context.core {
context.drive = core.drive(withIdentifier: driveID)
context.drive = core.drive(withIdentifier: driveID, attachedOnly: false)
}
})
let query = OCQuery(for: self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ open class ClientItemViewController: CollectionViewController, SortBarDelegate,

// Set .drive based on location.driveID
if let driveID = location?.driveID, let core = context.core {
context.drive = core.drive(withIdentifier: driveID)
context.drive = core.drive(withIdentifier: driveID, attachedOnly: false)
}

// Use inDataSource as queryDatasource if no query was provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public extension OCLocation {
func displayName(in context: ClientContext?) -> String {
switch type {
case .drive:
if let core = context?.core, let driveID, let drive = core.drive(withIdentifier: driveID), let driveName = drive.name {
if let core = context?.core, let driveID, let drive = core.drive(withIdentifier: driveID, attachedOnly: false), let driveName = drive.name {
return driveName
}
return "Space".localized
Expand Down Expand Up @@ -62,7 +62,7 @@ public extension OCLocation {
func displayIcon(in context: ClientContext?, forSidebar: Bool = false) -> UIImage? {
switch type {
case .drive:
if let core = context?.core, let driveID, let drive = core.drive(withIdentifier: driveID), let specialType = drive.specialType {
if let core = context?.core, let driveID, let drive = core.drive(withIdentifier: driveID, attachedOnly: false), let specialType = drive.specialType {
switch specialType {
case .personal:
return OCSymbol.icon(forSymbolName: forSidebar ? "person" : "person.fill")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public class ClientLocationPicker : NSObject {

case .drive:
if let driveID = location.driveID {
title = context.core?.drive(withIdentifier: driveID)?.name
title = context.core?.drive(withIdentifier: driveID, attachedOnly: false)?.name
}

case .folder: break
Expand Down
2 changes: 1 addition & 1 deletion ownCloudAppShared/User Interface/More/MoreViewHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ open class MoreViewHeader: UIView {

if item.isRoot {
if let core, core.useDrives, let driveID = item.driveID {
if let drive = core.drive(withIdentifier: driveID) {
if let drive = core.drive(withIdentifier: driveID, attachedOnly: false) {
itemName = drive.name
}
} else {
Expand Down

0 comments on commit c4722e5

Please sign in to comment.