mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-01 12:00:48 +00:00
Disable animations on login (support).
This commit is contained in:
parent
06629e8cd9
commit
e712a51833
@ -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…
Reference in New Issue
Block a user