Skip to content

Commit

Permalink
rewrite photos filter w/o ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jun 12, 2024
1 parent d2e744a commit dea4b0f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/vcardfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,10 @@ Task *VCardFactory::setVCard(PsiAccount *account, const VCard4::VCard &v, const
VCard4::VCard v2 = v;
v2.detach();
VCard4::PAdvUris photos;
for (auto const &uri :
v2.photo() | std::views::filter([](auto const &item) { return item.data.data.isEmpty(); })) {
photos.append(uri);
for (auto const &item : v2.photo()) {
if (item.data.data.isEmpty()) {
photos.append(item);
}
}
v2.setPhoto(photos);
el = v2.toXmlElement(*doc);
Expand Down

0 comments on commit dea4b0f

Please sign in to comment.