mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Disable animations on login (support).
This commit is contained in:
parent
06629e8cd9
commit
e712a51833
1 changed files with 15 additions and 2 deletions
|
@ -42,6 +42,14 @@ namespace {
|
|||
|
||||
constexpr str_const kDefaultCountry = "US";
|
||||
|
||||
void DisableAnimationsOnLogin() {
|
||||
anim::SetDisabled(true);
|
||||
Local::writeSettings();
|
||||
|
||||
cSetAutoPlayGif(false);
|
||||
Local::writeUserSettings();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Widget::Widget(QWidget *parent) : RpWidget(parent)
|
||||
|
@ -619,8 +627,13 @@ void Widget::Step::finish(const MTPUser &user, QImage &&photo) {
|
|||
App::wnd()->setupMain();
|
||||
|
||||
// "this" is already deleted here by creating the main widget.
|
||||
if (AuthSession::Exists() && !photo.isNull()) {
|
||||
Auth().api().uploadPeerPhoto(Auth().user(), std::move(photo));
|
||||
if (AuthSession::Exists()) {
|
||||
if (!photo.isNull()) {
|
||||
Auth().api().uploadPeerPhoto(Auth().user(), std::move(photo));
|
||||
}
|
||||
if (Auth().supportMode()) {
|
||||
DisableAnimationsOnLogin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue