@bcc-code/vue-bcc-chat-ui 5.4.2 → 5.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@bcc-code/vue-bcc-chat-ui",
3
3
  "author": "bcc-code",
4
4
  "license": "Apache-2.0",
5
- "version": "5.4.2",
5
+ "version": "5.4.4",
6
6
  "type": "module",
7
7
  "private": false,
8
8
  "files": [
@@ -114,14 +114,7 @@ watch([loggedIn, chat.onlineStatus, () => props.chatUid, chat.initialized, () =>
114
114
  localLoadMessageId.value = "";
115
115
  }
116
116
 
117
- if (offlineStore.getGroupMessages(_chatUid, {
118
- per_page: 1,
119
- affix: 'prepend'
120
- }).total === 0) {
121
- isChatMessagesEmpty.value = true;
122
- } else {
123
- isChatMessagesEmpty.value = false;
124
- }
117
+ isChatMessagesEmpty.value = false;
125
118
 
126
119
  if (chatGroup.value) {
127
120
 
@@ -136,12 +129,23 @@ watch([loggedIn, chat.onlineStatus, () => props.chatUid, chat.initialized, () =>
136
129
  }
137
130
  ])
138
131
 
132
+ // Allow some time for messages to load before displaying "no messages"
133
+ setTimeout(() => {
134
+ if (offlineStore.getGroupMessages(_chatUid, {
135
+ per_page: 1,
136
+ affix: 'prepend'
137
+ }).total === 0) {
138
+ isChatMessagesEmpty.value = true;
139
+ } else {
140
+ isChatMessagesEmpty.value = false;
141
+ }
142
+ }, 1500);
143
+
139
144
  if (!isChannel) {
140
145
  getGroupMembersInfo(_chatUid).then((participants) => groupMembers.value = participants);
141
146
  } else {
142
147
  groupMembers.value = [];
143
148
  }
144
-
145
149
  }
146
150
  await chat.clearGroupChatCount(props.chatUid);
147
151
  } else if (chatGroup.value) {