mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 23:25:15 +00:00
Replace App::self() with Auth().user().
Always have self Auth().user() when AuthSession exists.
This commit is contained in:
@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "lang/lang_keys.h"
|
||||
#include "mainwindow.h"
|
||||
#include "numbers.h"
|
||||
#include "auth_session.h"
|
||||
#include "messenger.h"
|
||||
|
||||
namespace Ui {
|
||||
@@ -4122,10 +4123,11 @@ void PhoneInput::focusInEvent(QFocusEvent *e) {
|
||||
|
||||
void PhoneInput::clearText() {
|
||||
QString phone;
|
||||
if (App::self()) {
|
||||
QVector<int> newPattern = phoneNumberParse(App::self()->phone());
|
||||
if (AuthSession::Exists()) {
|
||||
const auto self = Auth().user();
|
||||
QVector<int> newPattern = phoneNumberParse(self->phone());
|
||||
if (!newPattern.isEmpty()) {
|
||||
phone = App::self()->phone().mid(0, newPattern.at(0));
|
||||
phone = self->phone().mid(0, newPattern.at(0));
|
||||
}
|
||||
}
|
||||
setText(phone);
|
||||
|
Reference in New Issue
Block a user