Skip to content

Commit

Permalink
Dirtily adapt to new nk sessions implementation upstream
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
  • Loading branch information
claucambra committed Dec 3, 2024
1 parent 90845e3 commit 1d112ba
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ import NextcloudKit
extension NextcloudKit: RemoteInterface {

public var account: Account {
Account(
user: nkCommonInstance.user,
id: nkCommonInstance.userId,
serverUrl: nkCommonInstance.urlBase,
password: nkCommonInstance.password
guard let session = nkCommonInstance.nksessions.first else {
return Account(user: "", id: "", serverUrl: "", password: "")
}

return Account(
user: session.user,
id: session.userId,
serverUrl: session.urlBase,
password: session.password
)
}

Expand Down

0 comments on commit 1d112ba

Please sign in to comment.