mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Rename 'addRoom' to 'toggleUserSearch' in chat component
This commit is contained in:
parent
6659238fa1
commit
858e3fdee8
@ -25,7 +25,7 @@
|
|||||||
@send-message="sendMessage($event.detail[0])"
|
@send-message="sendMessage($event.detail[0])"
|
||||||
@fetch-messages="fetchMessages($event.detail[0])"
|
@fetch-messages="fetchMessages($event.detail[0])"
|
||||||
@fetch-more-rooms="fetchRooms"
|
@fetch-more-rooms="fetchRooms"
|
||||||
@add-room="addRoom"
|
@add-room="toggleUserSearch"
|
||||||
@show-demo-options="showDemoOptions = $event"
|
@show-demo-options="showDemoOptions = $event"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -236,9 +236,10 @@ export default {
|
|||||||
commitUnreadRoomCount: 'chat/UPDATE_ROOM_COUNT',
|
commitUnreadRoomCount: 'chat/UPDATE_ROOM_COUNT',
|
||||||
commitRoomIdFromSingleRoom: 'chat/UPDATE_ROOM_ID',
|
commitRoomIdFromSingleRoom: 'chat/UPDATE_ROOM_ID',
|
||||||
}),
|
}),
|
||||||
async fetchRooms({ room, options = {} } = {}) {
|
|
||||||
this.roomsLoaded = options.refetch ? this.roomsLoaded : false
|
async fetchRooms({ room } = {}) {
|
||||||
const offset = (options.refetch ? 0 : this.roomPage) * this.roomPageSize
|
this.roomsLoaded = false
|
||||||
|
const offset = this.roomPage * this.roomPageSize
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
data: { Room },
|
data: { Room },
|
||||||
@ -402,8 +403,8 @@ export default {
|
|||||||
return fullname.match(/\b\w/g).join('').substring(0, 3).toUpperCase()
|
return fullname.match(/\b\w/g).join('').substring(0, 3).toUpperCase()
|
||||||
},
|
},
|
||||||
|
|
||||||
addRoom() {
|
toggleUserSearch() {
|
||||||
this.$emit('open-close-user-search')
|
this.$emit('toggle-user-search')
|
||||||
},
|
},
|
||||||
|
|
||||||
newRoom(userId) {
|
newRoom(userId) {
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<chat
|
<chat
|
||||||
:roomId="getShowChat.showChat ? getShowChat.roomID : null"
|
:roomId="getShowChat.showChat ? getShowChat.roomID : null"
|
||||||
ref="chat"
|
ref="chat"
|
||||||
@open-close-user-search="showUserSearch = !showUserSearch"
|
@toggle-user-search="showUserSearch = !showUserSearch"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user