fix: allow go back if there's authed account

This commit is contained in:
AlexeyZavar 2025-02-05 23:03:00 +03:00
parent 4327fd4c58
commit dac0a6ec20
2 changed files with 9 additions and 3 deletions

View file

@ -29,6 +29,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "qr/qr_generate.h"
#include "styles/style_intro.h"
// AyuGram includes
#include "main/main_domain.h"
namespace Intro {
namespace details {
namespace {
@ -234,6 +238,10 @@ rpl::producer<QString> QrWidget::nextButtonText() const {
return rpl::single(QString());
}
bool QrWidget::hasBack() const {
return Core::App().domain().maybeLastOrSomeAuthedAccount();
}
void QrWidget::setupControls() {
const auto code = PrepareQrWidget(this, _qrCodes.events());
rpl::combine(

View file

@ -27,9 +27,7 @@ public:
void submit() override;
rpl::producer<QString> nextButtonText() const override;
bool hasBack() const override {
return false;
}
bool hasBack() const override;
private:
int errorTop() const override;