Rename 'addRoom' to 'toggleUserSearch' in chat component

This commit is contained in:
Wolfgang Huß 2023-07-20 10:40:04 +02:00
parent 6659238fa1
commit 858e3fdee8
3 changed files with 9 additions and 8 deletions

View File

@ -25,7 +25,7 @@
@send-message="sendMessage($event.detail[0])"
@fetch-messages="fetchMessages($event.detail[0])"
@fetch-more-rooms="fetchRooms"
@add-room="addRoom"
@add-room="toggleUserSearch"
@show-demo-options="showDemoOptions = $event"
>
<div
@ -236,9 +236,10 @@ export default {
commitUnreadRoomCount: 'chat/UPDATE_ROOM_COUNT',
commitRoomIdFromSingleRoom: 'chat/UPDATE_ROOM_ID',
}),
async fetchRooms({ room, options = {} } = {}) {
this.roomsLoaded = options.refetch ? this.roomsLoaded : false
const offset = (options.refetch ? 0 : this.roomPage) * this.roomPageSize
async fetchRooms({ room } = {}) {
this.roomsLoaded = false
const offset = this.roomPage * this.roomPageSize
try {
const {
data: { Room },
@ -402,8 +403,8 @@ export default {
return fullname.match(/\b\w/g).join('').substring(0, 3).toUpperCase()
},
addRoom() {
this.$emit('open-close-user-search')
toggleUserSearch() {
this.$emit('toggle-user-search')
},
newRoom(userId) {

View File

@ -476,7 +476,7 @@
"addMemberToGroupSuccess": "“{name}” was added to the group with the role “{role}”!",
"addUser": "Add User",
"addUserNoOptions": "No users found!",
"addUserPlaceholder": " User name",
"addUserPlaceholder": "User name",
"allGroups": "All Groups",
"button": {
"tooltip": "Show groups"

View File

@ -11,7 +11,7 @@
<chat
:roomId="getShowChat.showChat ? getShowChat.roomID : null"
ref="chat"
@open-close-user-search="showUserSearch = !showUserSearch"
@toggle-user-search="showUserSearch = !showUserSearch"
/>
</div>
</template>