mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -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
d45a42595b
commit
d2c6fa02be
6 changed files with 21 additions and 16 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -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