mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 22:15:57 +03:00
Clean up check for equality between sharee display names
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
c42617c2f8
commit
cc4e2591ec
1 changed files with 5 additions and 7 deletions
|
@ -504,16 +504,14 @@ void ShareModel::slotSharesFetched(const QList<SharePtr> &shares)
|
|||
auto hasDuplicates = false;
|
||||
for (auto j = i + 1; j < shareCount; ++j) {
|
||||
const auto otherSharee = _shares.at(j)->getShareWith();
|
||||
if (otherSharee == nullptr) {
|
||||
if (otherSharee == nullptr || sharee->format() != otherSharee->format()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sharee->format() == otherSharee->format()) {
|
||||
hasDuplicates = true; // Reassign is faster
|
||||
_duplicateDisplayNameShareIndices.insert(j);
|
||||
const auto targetIndex = index(j);
|
||||
dataChanged(targetIndex, targetIndex, {Qt::DisplayRole});
|
||||
}
|
||||
hasDuplicates = true; // Reassign is faster
|
||||
_duplicateDisplayNameShareIndices.insert(j);
|
||||
const auto targetIndex = index(j);
|
||||
dataChanged(targetIndex, targetIndex, {Qt::DisplayRole});
|
||||
}
|
||||
|
||||
if (hasDuplicates) {
|
||||
|
|
Loading…
Reference in a new issue