Skip to content

Commit c05e139

Browse files
committed
(fix) hide loading if no room selected
1 parent b8ce52b commit c05e139

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/ChatWindow/Room/Room.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33
v-show="(isMobile && !showRoomsList) || !isMobile || singleRoom"
44
class="vac-col-messages"
55
>
6-
<slot
7-
v-if="
8-
(!rooms.length && !loadingRooms) || (!room.roomId && !loadFirstRoom)
9-
"
10-
name="no-room-selected"
11-
>
6+
<slot v-if="showNoRoom" name="no-room-selected">
127
<div class="vac-container-center vac-room-empty">
138
<div>{{ textMessages.ROOM_EMPTY }}</div>
149
</div>
@@ -437,6 +432,14 @@ export default {
437432
!this.loadingRooms
438433
)
439434
},
435+
showNoRoom() {
436+
const noRoomSelected =
437+
(!this.rooms.length && !this.loadingRooms) ||
438+
(!this.room.roomId && !this.loadFirstRoom)
439+
440+
if (noRoomSelected) this.loadingMessages = false
441+
return noRoomSelected
442+
},
440443
showMessagesStarted() {
441444
return this.messages.length && this.messagesLoaded
442445
},

0 commit comments

Comments
 (0)