Skip to content

Commit

Permalink
coding
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana committed Jul 21, 2024
1 parent 0be67e9 commit c1884ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions iOSClient/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
if urlBase.last == "/" {
urlBase = String(urlBase.dropLast())
}
let account: String = "\(userProfile.userId)@\(urlBase)"

/// OLD account compatibility remove account
let oldAccount: String = "\(user) \(urlBase)"
NCManageDatabase.shared.deleteAccount(oldAccount)
///
var account: String = "\(user)@\(urlBase)"
if let accounts = NCManageDatabase.shared.getAccounts(),
accounts.contains(oldAccount) {
account = oldAccount
}

NCManageDatabase.shared.deleteAccount(account)
NCManageDatabase.shared.addAccount(account, urlBase: urlBase, user: user, userId: userProfile.userId, password: password)
Expand Down

0 comments on commit c1884ab

Please sign in to comment.