mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
fix: allow go back if there's authed account
This commit is contained in:
parent
4327fd4c58
commit
dac0a6ec20
2 changed files with 9 additions and 3 deletions
|
@ -29,6 +29,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "qr/qr_generate.h"
|
#include "qr/qr_generate.h"
|
||||||
#include "styles/style_intro.h"
|
#include "styles/style_intro.h"
|
||||||
|
|
||||||
|
// AyuGram includes
|
||||||
|
#include "main/main_domain.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Intro {
|
namespace Intro {
|
||||||
namespace details {
|
namespace details {
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -234,6 +238,10 @@ rpl::producer<QString> QrWidget::nextButtonText() const {
|
||||||
return rpl::single(QString());
|
return rpl::single(QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QrWidget::hasBack() const {
|
||||||
|
return Core::App().domain().maybeLastOrSomeAuthedAccount();
|
||||||
|
}
|
||||||
|
|
||||||
void QrWidget::setupControls() {
|
void QrWidget::setupControls() {
|
||||||
const auto code = PrepareQrWidget(this, _qrCodes.events());
|
const auto code = PrepareQrWidget(this, _qrCodes.events());
|
||||||
rpl::combine(
|
rpl::combine(
|
||||||
|
|
|
@ -27,9 +27,7 @@ public:
|
||||||
void submit() override;
|
void submit() override;
|
||||||
rpl::producer<QString> nextButtonText() const override;
|
rpl::producer<QString> nextButtonText() const override;
|
||||||
|
|
||||||
bool hasBack() const override {
|
bool hasBack() const override;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int errorTop() const override;
|
int errorTop() const override;
|
||||||
|
|
Loading…
Add table
Reference in a new issue