mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +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();
|
if (deleted) finish();
|
||||||
});
|
});
|
||||||
viewModel.loadContact(contactId);
|
viewModel.loadContact(contactId);
|
||||||
|
viewModel.getContactDisplayName().observe(this, name -> loadMessages());
|
||||||
|
|
||||||
setTransitionName(toolbarAvatar, getAvatarTransitionName(contactId));
|
setTransitionName(toolbarAvatar, getAvatarTransitionName(contactId));
|
||||||
setTransitionName(toolbarStatus, getBulbTransitionName(contactId));
|
setTransitionName(toolbarStatus, getBulbTransitionName(contactId));
|
||||||
@@ -243,8 +244,8 @@ public class ConversationActivity extends BriarActivity
|
|||||||
notificationManager.blockContactNotification(contactId);
|
notificationManager.blockContactNotification(contactId);
|
||||||
notificationManager.clearContactNotification(contactId);
|
notificationManager.clearContactNotification(contactId);
|
||||||
displayContactOnlineStatus();
|
displayContactOnlineStatus();
|
||||||
observeOnce(viewModel.getContactDisplayName(), this,
|
if (viewModel.getContactDisplayName().getValue() != null)
|
||||||
name -> loadMessages());
|
loadMessages();
|
||||||
list.startPeriodicUpdate();
|
list.startPeriodicUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ public class ConversationViewModel extends AndroidViewModel {
|
|||||||
try {
|
try {
|
||||||
contactManager.setContactAlias(contactId,
|
contactManager.setContactAlias(contactId,
|
||||||
alias.isEmpty() ? null : alias);
|
alias.isEmpty() ? null : alias);
|
||||||
// TODO also reload the conversation
|
|
||||||
loadContact(contactId);
|
loadContact(contactId);
|
||||||
} catch (DbException e) {
|
} catch (DbException e) {
|
||||||
logException(LOG, WARNING, e);
|
logException(LOG, WARNING, e);
|
||||||
|
|||||||
Reference in New Issue
Block a user