2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Implement correct saved messages history layout.

Forwarded info is displayed as a message author info (name/photo).
Outgoing messages without forwarded info are displayed as out().
Messages with save_from_ info have a button for GoToOriginal().
This commit is contained in:
John Preston
2017-12-05 20:14:28 +04:00
parent f8e094392f
commit 85d8273009
13 changed files with 235 additions and 108 deletions

View File

@@ -1013,6 +1013,20 @@ void MainWidget::showSendPathsLayer() {
hiderLayer(object_ptr<HistoryHider>(this));
}
void MainWidget::showForwardBox(SelectedItemSet &&items) {
auto controller = std::make_unique<ChooseRecipientBoxController>(
[items = std::move(items)](not_null<PeerData*> peer) {
App::main()->setForwardDraft(peer->id, items);
});
Ui::show(Box<PeerListBox>(
std::move(controller),
[](not_null<PeerListBox*> box) {
box->addButton(langFactory(lng_cancel), [box] {
box->closeBox();
});
}));
}
void MainWidget::deleteLayer(int selectedCount) {
if (selectedCount) {
auto forDelete = true;