Fix build with new lib_ui commits.

This commit is contained in:
John Preston 2020-04-13 12:34:51 +04:00
parent 1d613995db
commit f5aba5a907
7 changed files with 12 additions and 14 deletions

View File

@ -78,7 +78,7 @@ void ApplyArchivedResult(const MTPDmessages_stickerSetInstallResultArchive &d) {
Local::writeArchivedStickers();
auto toast = Ui::Toast::Config();
toast.text = tr::lng_stickers_packs_archived(tr::now);
toast.text = { tr::lng_stickers_packs_archived(tr::now) };
toast.maxWidth = toast.minWidth = st::stickersToastMaxWidth;
toast.multiline = true;
toast.padding = st::stickersToastPadding;

View File

@ -238,7 +238,7 @@ void ShowErrorToast(const QString &text) {
auto config = Ui::Toast::Config();
config.multiline = true;
config.minWidth = st::msgMinWidth;
config.text = text;
config.text = { text };
Ui::Toast::Show(config);
}

View File

@ -51,7 +51,7 @@ void ShowErrorToast(const QString &text) {
auto config = Ui::Toast::Config();
config.multiline = true;
config.minWidth = st::msgMinWidth;
config.text = text;
config.text = { text };
Ui::Toast::Show(config);
}

View File

@ -52,7 +52,7 @@ ClickHandlerPtr Dice::link() {
auto config = Ui::Toast::Config();
config.multiline = true;
config.minWidth = st::msgMinWidth;
config.text = tr::lng_about_dice(tr::now);
config.text = { tr::lng_about_dice(tr::now) };
Ui::Toast::Show(config);
});
return kHandler;

View File

@ -2396,9 +2396,9 @@ void OverlayWidget::initThemePreview() {
_themeShare->setClickedCallback([=] {
QGuiApplication::clipboard()->setText(
Core::App().createInternalLinkFull("addtheme/" + slug));
auto config = Ui::Toast::Config();
config.text = tr::lng_background_link_copied(tr::now);
Ui::Toast::Show(this, config);
Ui::Toast::Show(
this,
tr::lng_background_link_copied(tr::now));
});
} else {
_themeShare.destroy();

View File

@ -273,9 +273,7 @@ void SeparatePanel::showBox(
}
void SeparatePanel::showToast(const QString &text) {
auto toast = Ui::Toast::Config();
toast.text = text;
Ui::Toast::Show(this, toast);
Ui::Toast::Show(this, text);
}
void SeparatePanel::ensureLayerCreated() {

View File

@ -630,7 +630,7 @@ void FolderFiller::addTogglesForArchive() {
_addAction(tr::lng_context_archive_to_menu(tr::now), [=] {
auto toast = Ui::Toast::Config();
toast.text = tr::lng_context_archive_to_menu_info(tr::now);
toast.text = { tr::lng_context_archive_to_menu_info(tr::now) };
toast.minWidth = toast.maxWidth = st::boxWideWidth;
toast.multiline = true;
toast.durationMs = kArchivedToastDuration;
@ -927,7 +927,7 @@ QPointer<Ui::RpWidget> ShowSendNowMessagesBox(
auto config = Ui::Toast::Config();
config.multiline = true;
config.minWidth = st::msgMinWidth;
config.text = error;
config.text = { error };
Ui::Toast::Show(config);
return { nullptr };
}
@ -1036,9 +1036,9 @@ void PeerMenuAddMuteAction(
void ToggleHistoryArchived(not_null<History*> history, bool archived) {
const auto callback = [=] {
auto toast = Ui::Toast::Config();
toast.text = archived
toast.text = { archived
? tr::lng_archived_added(tr::now)
: tr::lng_archived_removed(tr::now);
: tr::lng_archived_removed(tr::now) };
toast.minWidth = toast.maxWidth = st::boxWideWidth;
toast.multiline = true;
if (archived) {