mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 23:25:20 +03:00
parent
f50f3a8db7
commit
0f6b7cf580
3 changed files with 38 additions and 5 deletions
|
@ -157,7 +157,7 @@ dependencies {
|
|||
|
||||
implementation 'com.github.wooplr:Spotlight:1.2.3'
|
||||
|
||||
implementation 'com.github.mario:ChatKit:ed2e3cf370'
|
||||
implementation 'com.github.mario:ChatKit:40a8e9cf69'
|
||||
|
||||
implementation 'com.otaliastudios:autocomplete:1.1.0'
|
||||
|
||||
|
|
|
@ -744,16 +744,44 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
if (emptyLayout != null) {
|
||||
emptyLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (messagesListView != null) {
|
||||
messagesListView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
} else {
|
||||
boolean foundRealMessage = false;
|
||||
for (int i = 0; i < chatMessageList.size(); i++) {
|
||||
if (TextUtils.isEmpty(chatMessageList.get(i).getSystemMessage())) {
|
||||
foundRealMessage = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundRealMessage) {
|
||||
if (emptyLayout != null) {
|
||||
emptyLayout.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (messagesListView != null) {
|
||||
messagesListView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
if (emptyLayout != null && emptyLayout.getVisibility() != View.VISIBLE) {
|
||||
emptyLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (messagesListView != null && messagesListView.getVisibility() != View.GONE) {
|
||||
messagesListView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (emptyLayout.getVisibility() != View.GONE) {
|
||||
if (emptyLayout != null) {
|
||||
emptyLayout.setVisibility(View.GONE);
|
||||
}
|
||||
if (messagesListView.getVisibility() != View.VISIBLE) {
|
||||
|
||||
if (messagesListView != null) {
|
||||
messagesListView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,4 +130,9 @@ public class ChatMessage implements IMessage, MessageContentType {
|
|||
public Date getCreatedAt() {
|
||||
return new Date(timestamp * 1000L);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSystemMessage() {
|
||||
return new EnumSystemMessageTypeConverter().convertToString(getSystemMessageType());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue