Skip to content

Commit 24de7b3

Browse files
fesaveabelgardep
authored andcommitted
CR suggestions
1 parent 6bf59ec commit 24de7b3

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

changelog/unreleased/3643

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Bugfix: Fixed a bug in the list of users to be shared
1+
Bugfix: Prevented signed in user in the list of users to be shared
22

33
Previously, user list for sharing contains signed in user,
44
now this user is omitted to avoid errors.

owncloudApp/src/main/java/com/owncloud/android/presentation/providers/sharing/UsersAndGroupsSearchProvider.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,11 @@ class UsersAndGroupsSearchProvider : ContentProvider() {
177177
val federatedShareAllowed = capabilities?.filesSharingFederationOutgoing?.isTrue ?: false
178178

179179
try {
180+
val userName = AccountUtils.getUsernameOfAccount(account.name)
180181
while (namesIt.hasNext()) {
181182
item = namesIt.next()
182-
if (item.label == AccountUtils.getUsernameOfAccount(account.name) && item.shareType == ShareType.USER) {
183-
item = namesIt.next()
183+
if (item.label == userName && item.shareType == ShareType.USER) {
184+
continue
184185
}
185186
var userName = item.label
186187
val type = item.shareType

0 commit comments

Comments
 (0)