mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-28 01:24:03 +03:00
rename updateUser to updateOrCreateUser
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
96910c02a1
commit
7ce5746969
2 changed files with 3 additions and 3 deletions
|
@ -327,7 +327,7 @@ class SettingsController : NewBaseController(R.layout.controller_settings) {
|
|||
}
|
||||
|
||||
currentUser!!.clientCertificate = finalAlias
|
||||
userManager.updateUser(currentUser!!)
|
||||
userManager.updateOrCreateUser(currentUser!!)
|
||||
},
|
||||
arrayOf("RSA", "EC"),
|
||||
null,
|
||||
|
@ -601,7 +601,7 @@ class SettingsController : NewBaseController(R.layout.controller_settings) {
|
|||
}
|
||||
if ((!TextUtils.isEmpty(displayName) && !(displayName == currentUser!!.displayName))) {
|
||||
currentUser!!.displayName = displayName
|
||||
userManager.updateUser(currentUser!!)
|
||||
userManager.updateOrCreateUser(currentUser!!)
|
||||
binding.displayNameText.text = currentUser!!.displayName
|
||||
}
|
||||
},
|
||||
|
|
|
@ -123,7 +123,7 @@ class UserManager internal constructor(private val userRepository: UsersReposito
|
|||
}.toSingle()
|
||||
}
|
||||
|
||||
fun updateUser(user: User): Single<Int> {
|
||||
fun updateOrCreateUser(user: User): Single<Int> {
|
||||
return Single.fromCallable {
|
||||
when (user.id) {
|
||||
null -> userRepository.insertUser(user).toInt()
|
||||
|
|
Loading…
Reference in a new issue