2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Use layers and boxes from lib_ui.

This commit is contained in:
John Preston
2019-09-18 14:19:05 +03:00
parent 860353824b
commit a6c84c36c0
209 changed files with 586 additions and 3349 deletions

View File

@@ -3003,7 +3003,7 @@ void HistoryWidget::sendScheduled() {
const auto callback = [=](Api::SendOptions options) { send(options); };
Ui::show(
HistoryView::PrepareScheduleBox(_list, sendMenuType(), callback),
LayerOption::KeepOther);
Ui::LayerOption::KeepOther);
}
SendMenuType HistoryWidget::sendMenuType() const {
@@ -5725,7 +5725,7 @@ bool HistoryWidget::sendExistingDocument(not_null<DocumentData*> document) {
? Data::RestrictionError(_peer, ChatRestriction::f_send_stickers)
: std::nullopt;
if (error) {
Ui::show(Box<InformBox>(*error), LayerOption::KeepOther);
Ui::show(Box<InformBox>(*error), Ui::LayerOption::KeepOther);
return false;
} else if (!_peer || !_peer->canWrite()) {
return false;
@@ -5756,7 +5756,7 @@ bool HistoryWidget::sendExistingPhoto(not_null<PhotoData*> photo) {
? Data::RestrictionError(_peer, ChatRestriction::f_send_media)
: std::nullopt;
if (error) {
Ui::show(Box<InformBox>(*error), LayerOption::KeepOther);
Ui::show(Box<InformBox>(*error), Ui::LayerOption::KeepOther);
return false;
} else if (!_peer || !_peer->canWrite()) {
return false;