From f0e1498a41eea1a66d24805d346a696b3c76bd79 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 9 Jun 2022 04:16:19 +0300 Subject: [PATCH] Fixed display of failed peer resolve in corresponding window. --- .../window/window_session_controller.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index 81680f9e1..a19773f68 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -210,10 +210,12 @@ void SessionNavigation::resolvePhone( }).fail([=](const MTP::Error &error) { _resolveRequestId = 0; if (error.code() == 400) { - show(Ui::MakeInformBox(tr::lng_username_by_phone_not_found( - tr::now, - lt_phone, - Ui::FormatPhone(phone)))); + parentController()->show( + Ui::MakeInformBox(tr::lng_username_by_phone_not_found( + tr::now, + lt_phone, + Ui::FormatPhone(phone))), + Ui::LayerOption::CloseOther); } }).send(); } @@ -233,8 +235,10 @@ void SessionNavigation::resolveUsername( }).fail([=](const MTP::Error &error) { _resolveRequestId = 0; if (error.code() == 400) { - show(Ui::MakeInformBox( - tr::lng_username_not_found(tr::now, lt_user, username))); + parentController()->show( + Ui::MakeInformBox( + tr::lng_username_not_found(tr::now, lt_user, username)), + Ui::LayerOption::CloseOther); } }).send(); }