2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-07 13:46:05 +00:00

Show Saved Messages in Reply in another chat.

This commit is contained in:
John Preston
2023-10-29 09:52:42 +04:00
parent ec3fc8c749
commit 597816db09
7 changed files with 31 additions and 25 deletions

View File

@@ -313,7 +313,7 @@ void ChatsListBoxController::rebuildRows() {
return count;
};
auto added = 0;
if (respectSavedMessagesChat()) {
if (!savedMessagesChatStatus().isEmpty()) {
if (appendRow(session().data().history(session().user()))) {
++added;
}
@@ -330,7 +330,7 @@ void ChatsListBoxController::rebuildRows() {
const auto history = static_cast<const Row&>(a).history();
return history->inChatList();
});
if (respectSavedMessagesChat()) {
if (!savedMessagesChatStatus().isEmpty()) {
delegate()->peerListPartitionRows([](const PeerListRow &a) {
return a.peer()->isSelf();
});
@@ -696,6 +696,10 @@ void ChooseRecipientBoxController::rowClicked(not_null<PeerListRow*> row) {
}
}
QString ChooseRecipientBoxController::savedMessagesChatStatus() const {
return tr::lng_saved_forward_here(tr::now);
}
auto ChooseRecipientBoxController::createRow(
not_null<History*> history) -> std::unique_ptr<Row> {
const auto peer = history->peer;