Skip to content

Make NextcloudRemoteInterface initialisable#64

Closed
claucambra wants to merge 2 commits into
mainfrom
bugfix/ncri-init
Closed

Make NextcloudRemoteInterface initialisable#64
claucambra wants to merge 2 commits into
mainfrom
bugfix/ncri-init

Conversation

@claucambra
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
@claucambra claucambra added the bug Something isn't working label Apr 24, 2025
@claucambra claucambra added this to the 2.1 milestone Apr 24, 2025
@claucambra claucambra requested a review from Copilot April 24, 2025 12:39
@claucambra claucambra self-assigned this Apr 24, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR makes NextcloudRemoteInterface initialisable by adding an initializer that accepts an optional delegate, and updates the dependency for NextcloudKit in Package.swift to use the branch "work/f-openclass".

  • Added an initializer in NextcloudRemoteInterface.swift that sets a delegate via dependency injection.
  • Updated Package.swift to use a branch dependency for NextcloudKit instead of a version-based one.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Sources/NextcloudFileProviderKit/Interface/NextcloudRemoteInterface.swift Added initializer for delegate injection
Package.swift Changed NextcloudKit dependency from a version-based to a branch-based specification

Comment on lines +25 to +27
public init(delegate: NextcloudKitDelegate? = nil) {
super.init()
self.delegate = delegate
Copy link

Copilot AI Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that this initializer properly calls the designated initializer of the superclass. If the new initializer is not a designated initializer, consider marking it as a convenience initializer for clarity.

Suggested change
public init(delegate: NextcloudKitDelegate? = nil) {
super.init()
self.delegate = delegate
public convenience init(delegate: NextcloudKitDelegate? = nil) {
self.init()

Copilot uses AI. Check for mistakes.
Comment thread Package.swift
.upToNextMajor(from: "2.1.2")
),
.package(url: "https://github.com/nextcloud/NextcloudKit", from: "5.0.4"),
.package(url: "https://github.com/nextcloud/NextcloudKit", branch: "work/f-openclass"),
Copy link

Copilot AI Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching from a version-based dependency to a branch-based dependency may affect build stability. Consider documenting this decision or evaluating if a version-based dependency could be used instead.

Suggested change
.package(url: "https://github.com/nextcloud/NextcloudKit", branch: "work/f-openclass"),
.package(url: "https://github.com/nextcloud/NextcloudKit", .upToNextMajor(from: "1.0.0")),

Copilot uses AI. Check for mistakes.
@claucambra claucambra closed this Apr 24, 2025
@claucambra claucambra removed this from the 2.1 milestone May 9, 2025
@Rello Rello deleted the bugfix/ncri-init branch August 15, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants