Commit 6568c6a8 authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud

smartlist: show last interaction when syncing after importing account

When a new conversation is detected via conversationReady, load the last
messages to show it in the smartlist. Also, in smartlistviewholder,
update last interaction's visibility when needed.

Change-Id: I917e907edcb17d67dce351c2d4da741ffbe51552
GitLab: #859
parent 9739141f
......@@ -83,8 +83,10 @@ public class SmartListViewHolder extends RecyclerView.ViewHolder {
binding.convLastTime.setText(lastInteractionStr);
if (smartListViewModel.hasOngoingCall()) {
binding.convLastItem.setVisibility(View.VISIBLE);
binding.convLastItem.setText(itemView.getContext().getString(R.string.ongoing_call));
} else if (smartListViewModel.getLastEvent() != null) {
binding.convLastItem.setVisibility(View.VISIBLE);
binding.convLastItem.setText(getLastEventSummary(smartListViewModel.getLastEvent(), itemView.getContext()));
} else {
binding.convLastItem.setVisibility(View.GONE);
......
......@@ -1639,6 +1639,7 @@ public class AccountService {
}
}
account.conversationStarted(conversation);
loadMore(conversation, 2);
}
public void conversationRemoved(String accountId, String conversationId) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment