mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
[android] Reload conversation when contact name changes
This commit is contained in:
@@ -203,6 +203,7 @@ public class ConversationActivity extends BriarActivity
|
||||
if (deleted) finish();
|
||||
});
|
||||
viewModel.loadContact(contactId);
|
||||
viewModel.getContactDisplayName().observe(this, name -> loadMessages());
|
||||
|
||||
setTransitionName(toolbarAvatar, getAvatarTransitionName(contactId));
|
||||
setTransitionName(toolbarStatus, getBulbTransitionName(contactId));
|
||||
@@ -243,8 +244,8 @@ public class ConversationActivity extends BriarActivity
|
||||
notificationManager.blockContactNotification(contactId);
|
||||
notificationManager.clearContactNotification(contactId);
|
||||
displayContactOnlineStatus();
|
||||
observeOnce(viewModel.getContactDisplayName(), this,
|
||||
name -> loadMessages());
|
||||
if (viewModel.getContactDisplayName().getValue() != null)
|
||||
loadMessages();
|
||||
list.startPeriodicUpdate();
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ public class ConversationViewModel extends AndroidViewModel {
|
||||
try {
|
||||
contactManager.setContactAlias(contactId,
|
||||
alias.isEmpty() ? null : alias);
|
||||
// TODO also reload the conversation
|
||||
loadContact(contactId);
|
||||
} catch (DbException e) {
|
||||
logException(LOG, WARNING, e);
|
||||
|
||||
Reference in New Issue
Block a user