Commit 3bdcd205 authored by Grigory Fedorov's avatar Grigory Fedorov

ChatViewer App bar title set to contacts name.

parent 1d614671
......@@ -31,7 +31,9 @@ import com.xabber.android.data.message.AbstractChat;
import com.xabber.android.data.message.MessageManager;
import com.xabber.android.data.message.OnChatChangedListener;
import com.xabber.android.data.notification.NotificationManager;
import com.xabber.android.data.roster.AbstractContact;
import com.xabber.android.data.roster.OnContactChangedListener;
import com.xabber.android.data.roster.RosterManager;
import com.xabber.android.ui.adapter.ChatViewerAdapter;
import com.xabber.android.ui.helper.ManagedActivity;
import com.xabber.androiddev.R;
......@@ -323,6 +325,10 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
MessageManager.getInstance().getChat(account, user).getRequiredMessageCount());
NotificationManager.getInstance().removeMessageNotification(account, user);
final AbstractContact abstractContact = RosterManager.getInstance().getBestContact(account, user);
setTitle(abstractContact.getName());
}
@Override
......
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