mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-12 10:32:36 +00:00
Fix a user settings bugs
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
58bdc2cc67
commit
6f59a881ec
@ -331,22 +331,16 @@ public class SettingsController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boolean needsToUpdateUserId = !TextUtils.isEmpty(userProfileOverall.getOcs().getData().getUserId()) &&
|
if ((!TextUtils.isEmpty(displayName) && !displayName.equals(userEntity.getDisplayName()))) {
|
||||||
!userProfileOverall.getOcs().getData().getUserId().equals(userEntity.getUserId());
|
|
||||||
if ((!TextUtils.isEmpty(displayName) && !displayName.equals(userEntity.getDisplayName())) ||
|
|
||||||
needsToUpdateUserId) {
|
|
||||||
|
|
||||||
dbQueryDisposable = userUtils.createOrUpdateUser(null,
|
dbQueryDisposable = userUtils.createOrUpdateUser(null,
|
||||||
null,
|
null,
|
||||||
null, displayName, null, null,
|
null, displayName, null, null,
|
||||||
userProfileOverall.getOcs().getData().getUserId(), userEntity.getId(), null, null)
|
null, userEntity.getId(), null, null)
|
||||||
.subscribeOn(Schedulers.newThread())
|
.subscribeOn(Schedulers.newThread())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(userEntityResult -> {
|
.subscribe(userEntityResult -> {
|
||||||
displayNameTextView.setText(userEntityResult.getDisplayName());
|
displayNameTextView.setText(userEntityResult.getDisplayName());
|
||||||
if (needsToUpdateUserId) {
|
|
||||||
loadAvatarImage();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
throwable -> {
|
throwable -> {
|
||||||
dispose(dbQueryDisposable);
|
dispose(dbQueryDisposable);
|
||||||
|
Loading…
Reference in New Issue
Block a user