Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
return;
}
+ const auto totalTagCount = totalTags();
+ const auto tagsWillBeTruncated = maxTags < totalTagCount;
+
+ // Summary tag will be after the last tag
+ const auto notifyOverflowingTagsRemoved = tagsWillBeTruncated && totalTagCount > maxTags;
+
+ if (notifyOverflowingTagsRemoved) {
+ beginResetModel();
+ }
+
_maxTags = maxTags;
+
+ if (notifyOverflowingTagsRemoved) {
+ endResetModel();
+ }
+
Q_EMIT maxTagsChanged();
}
QStringList _tags;
int _maxTags = 0;
- int _totalTags = 0;
};
}