mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
avoid 'No users in here' in user list when there actually are users
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
parent
1a4e4b87aa
commit
c11689b5b2
2 changed files with 13 additions and 8 deletions
|
|
@ -461,8 +461,13 @@ export default {
|
|||
group: this.selectedGroup !== 'disabled' ? this.selectedGroup : '',
|
||||
search: this.searchQuery,
|
||||
})
|
||||
.then((response) => {
|
||||
response ? $state.loaded() : $state.complete()
|
||||
.then((usersCount) => {
|
||||
if (usersCount > 0) {
|
||||
$state.loaded()
|
||||
}
|
||||
if (usersCount < this.usersLimit) {
|
||||
$state.complete()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -224,11 +224,11 @@ const actions = {
|
|||
cancelToken: searchRequestCancelSource.token,
|
||||
})
|
||||
.then((response) => {
|
||||
if (Object.keys(response.data.ocs.data.users).length > 0) {
|
||||
const usersCount = Object.keys(response.data.ocs.data.users).length
|
||||
if (usersCount > 0) {
|
||||
context.commit('appendUsers', response.data.ocs.data.users)
|
||||
return Object.keys(response.data.ocs.data.users).length >= limit
|
||||
}
|
||||
return false
|
||||
return usersCount
|
||||
})
|
||||
.catch((error) => {
|
||||
if (!axios.isCancel(error)) {
|
||||
|
|
@ -241,11 +241,11 @@ const actions = {
|
|||
cancelToken: searchRequestCancelSource.token,
|
||||
})
|
||||
.then((response) => {
|
||||
if (Object.keys(response.data.ocs.data.users).length > 0) {
|
||||
const usersCount = Object.keys(response.data.ocs.data.users).length
|
||||
if (usersCount > 0) {
|
||||
context.commit('appendUsers', response.data.ocs.data.users)
|
||||
return Object.keys(response.data.ocs.data.users).length >= limit
|
||||
}
|
||||
return false
|
||||
return usersCount
|
||||
})
|
||||
.catch((error) => {
|
||||
if (!axios.isCancel(error)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue