mirror of https://github.com/procxx/kepka.git
Disable animations on login (support).
This commit is contained in:
parent
06629e8cd9
commit
e712a51833
|
@ -42,6 +42,14 @@ namespace {
|
||||||
|
|
||||||
constexpr str_const kDefaultCountry = "US";
|
constexpr str_const kDefaultCountry = "US";
|
||||||
|
|
||||||
|
void DisableAnimationsOnLogin() {
|
||||||
|
anim::SetDisabled(true);
|
||||||
|
Local::writeSettings();
|
||||||
|
|
||||||
|
cSetAutoPlayGif(false);
|
||||||
|
Local::writeUserSettings();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
Widget::Widget(QWidget *parent) : RpWidget(parent)
|
Widget::Widget(QWidget *parent) : RpWidget(parent)
|
||||||
|
@ -619,8 +627,13 @@ void Widget::Step::finish(const MTPUser &user, QImage &&photo) {
|
||||||
App::wnd()->setupMain();
|
App::wnd()->setupMain();
|
||||||
|
|
||||||
// "this" is already deleted here by creating the main widget.
|
// "this" is already deleted here by creating the main widget.
|
||||||
if (AuthSession::Exists() && !photo.isNull()) {
|
if (AuthSession::Exists()) {
|
||||||
Auth().api().uploadPeerPhoto(Auth().user(), std::move(photo));
|
if (!photo.isNull()) {
|
||||||
|
Auth().api().uploadPeerPhoto(Auth().user(), std::move(photo));
|
||||||
|
}
|
||||||
|
if (Auth().supportMode()) {
|
||||||
|
DisableAnimationsOnLogin();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue