mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Show correct error on stopped starref.
This commit is contained in:
parent
b401c37c39
commit
ad6272bfe5
2 changed files with 4 additions and 1 deletions
|
@ -1703,6 +1703,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"lng_star_ref_link_copy_users#other" = "{count} users have opened {app} through this link.";
|
||||
"lng_star_ref_link_copied_title" = "Link copied to clipboard";
|
||||
"lng_star_ref_link_copied_text" = "Share this link and earn {amount} of what people who use it spend in {app}!";
|
||||
"lng_star_ref_stopped" = "This link was part of an affiliate program that has been terminated by the app owner.";
|
||||
|
||||
"lng_manage_discussion_group" = "Discussion";
|
||||
"lng_manage_discussion_group_add" = "Add a group";
|
||||
|
|
|
@ -472,7 +472,9 @@ void SessionNavigation::resolveUsername(
|
|||
resolveDone(result, done);
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
_resolveRequestId = 0;
|
||||
if (error.code() == 400) {
|
||||
if (error.type() == u"STARREF_EXPIRED"_q) {
|
||||
parentController()->showToast(tr::lng_star_ref_stopped(tr::now));
|
||||
} else if (error.code() == 400) {
|
||||
parentController()->show(
|
||||
Ui::MakeInformBox(
|
||||
tr::lng_username_not_found(tr::now, lt_user, username)),
|
||||
|
|
Loading…
Add table
Reference in a new issue