2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Allow editing tag names in Saved Messages.

This commit is contained in:
John Preston
2024-01-26 13:38:38 +04:00
parent 32462fca9b
commit d116c8fea0
13 changed files with 289 additions and 15 deletions

View File

@@ -1430,8 +1430,10 @@ void InnerWidget::mousePressEvent(QMouseEvent *e) {
});
} else if (_pressed) {
auto row = _pressed;
const auto updateCallback = [this, row] {
if (!_pinnedShiftAnimation.animating()) {
const auto weak = Ui::MakeWeak(this);
const auto updateCallback = [weak, row] {
const auto strong = weak.data();
if (!strong || !strong->_pinnedShiftAnimation.animating()) {
row->entry()->updateChatListEntry();
}
};

View File

@@ -110,7 +110,11 @@ void SearchTags::fill(const std::vector<Data::Reaction> &list) {
}
};
for (const auto &reaction : list) {
push(reaction.id, ComposeText(reaction));
if (reaction.count > 0
|| ranges::contains(_added, reaction.id)
|| ranges::contains(selected, reaction.id)) {
push(reaction.id, ComposeText(reaction));
}
}
for (const auto &reaction : _added) {
if (!ranges::contains(_tags, reaction, &Tag::id)) {
@@ -119,6 +123,7 @@ void SearchTags::fill(const std::vector<Data::Reaction> &list) {
}
if (_width > 0) {
layout();
_repaintRequests.fire({});
}
}