mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Show pin/unpin correctly in Recent Actions.
This commit is contained in:
@@ -533,11 +533,11 @@ void GenerateItems(
|
|||||||
};
|
};
|
||||||
|
|
||||||
auto createUpdatePinned = [&](const MTPDchannelAdminLogEventActionUpdatePinned &action) {
|
auto createUpdatePinned = [&](const MTPDchannelAdminLogEventActionUpdatePinned &action) {
|
||||||
if (action.vmessage().type() == mtpc_messageEmpty) {
|
action.vmessage().match([&](const MTPDmessage &data) {
|
||||||
auto text = tr::lng_admin_log_unpinned_message(tr::now, lt_from, fromLinkText);
|
const auto pinned = data.is_pinned();
|
||||||
addSimpleServiceMessage(text);
|
auto text = (pinned
|
||||||
} else {
|
? tr::lng_admin_log_pinned_message
|
||||||
auto text = tr::lng_admin_log_pinned_message(tr::now, lt_from, fromLinkText);
|
: tr::lng_admin_log_unpinned_message)(tr::now, lt_from, fromLinkText);
|
||||||
addSimpleServiceMessage(text);
|
addSimpleServiceMessage(text);
|
||||||
|
|
||||||
auto detachExistingItem = false;
|
auto detachExistingItem = false;
|
||||||
@@ -548,7 +548,10 @@ void GenerateItems(
|
|||||||
date),
|
date),
|
||||||
MTPDmessage_ClientFlag::f_admin_log_entry,
|
MTPDmessage_ClientFlag::f_admin_log_entry,
|
||||||
detachExistingItem));
|
detachExistingItem));
|
||||||
}
|
}, [&](const auto &) {
|
||||||
|
auto text = tr::lng_admin_log_unpinned_message(tr::now, lt_from, fromLinkText);
|
||||||
|
addSimpleServiceMessage(text);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
auto createEditMessage = [&](const MTPDchannelAdminLogEventActionEditMessage &action) {
|
auto createEditMessage = [&](const MTPDchannelAdminLogEventActionEditMessage &action) {
|
||||||
|
Reference in New Issue
Block a user