mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Fix issues with setting the title
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
1f556d73cf
commit
7eeefa3ae6
@ -508,7 +508,6 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
|
|
||||||
if (currentConversation != null && currentConversation.getRoomId() != null) {
|
if (currentConversation != null && currentConversation.getRoomId() != null) {
|
||||||
loadAvatarForStatusBar();
|
loadAvatarForStatusBar();
|
||||||
checkLobbyState();
|
|
||||||
setTitle();
|
setTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -712,7 +711,11 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTitle() {
|
protected String getTitle() {
|
||||||
return String.valueOf(EmojiCompat.get().process(currentConversation.getDisplayName()));
|
if (currentConversation != null) {
|
||||||
|
return String.valueOf(EmojiCompat.get().process(currentConversation.getDisplayName()));
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1160,6 +1163,10 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
chatMessage.setActiveUser(conversationUser);
|
chatMessage.setActiveUser(conversationUser);
|
||||||
chatMessage.setLinkPreviewAllowed(isLinkPreviewAllowed);
|
chatMessage.setLinkPreviewAllowed(isLinkPreviewAllowed);
|
||||||
|
|
||||||
|
if (chatMessage.getJsonMessageId() > globalLastKnownFutureMessageId) {
|
||||||
|
globalLastKnownFutureMessageId = chatMessage.getJsonMessageId();
|
||||||
|
}
|
||||||
|
|
||||||
// if credentials are empty, we're acting as a guest
|
// if credentials are empty, we're acting as a guest
|
||||||
if (TextUtils.isEmpty(credentials) && myFirstMessage != null && !TextUtils.isEmpty(myFirstMessage.toString())) {
|
if (TextUtils.isEmpty(credentials) && myFirstMessage != null && !TextUtils.isEmpty(myFirstMessage.toString())) {
|
||||||
if (chatMessage.getActorType().equals("guests")) {
|
if (chatMessage.getActorType().equals("guests")) {
|
||||||
@ -1169,7 +1176,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean shouldScroll =
|
boolean shouldScroll =
|
||||||
!isThereANewNotice && !shouldAddNewMessagesNotice && layoutManager.findFirstVisibleItemPosition() == 0 ||
|
!isThereANewNotice && layoutManager.findFirstVisibleItemPosition() == 0 ||
|
||||||
(adapter != null && adapter.getItemCount() == 0);
|
(adapter != null && adapter.getItemCount() == 0);
|
||||||
|
|
||||||
if (!shouldAddNewMessagesNotice && !shouldScroll && popupBubble != null) {
|
if (!shouldAddNewMessagesNotice && !shouldScroll && popupBubble != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user