mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +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 "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(
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue