mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Fix aliases being duplicated in the aliases list in some cases
This commit is contained in:
parent
ac0de5779e
commit
d5b06939fd
1 changed files with 7 additions and 7 deletions
|
@ -37,8 +37,8 @@ AliasEditingModel::AliasEditingModel(const std::string &rid, QObject *parent)
|
||||||
|
|
||||||
for (const auto &alias : aliasEvent.alt_aliases) {
|
for (const auto &alias : aliasEvent.alt_aliases) {
|
||||||
if (!seen_aliases.count(alias)) {
|
if (!seen_aliases.count(alias)) {
|
||||||
aliases.push_back(Entry{aliasEvent.alias, false, true, false});
|
aliases.push_back(Entry{alias, false, true, false});
|
||||||
seen_aliases.insert(aliasEvent.alias);
|
seen_aliases.insert(alias);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,6 +308,7 @@ AliasEditingModel::updatePublishedAliases(std::vector<std::string> advAliases)
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
beginInsertRows(QModelIndex(), aliases.size(), aliases.size());
|
beginInsertRows(QModelIndex(), aliases.size(), aliases.size());
|
||||||
|
@ -316,7 +317,6 @@ AliasEditingModel::updatePublishedAliases(std::vector<std::string> advAliases)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AliasEditingModel::commit()
|
AliasEditingModel::commit()
|
||||||
|
|
Loading…
Reference in a new issue