mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 06:55:58 +00:00
pausing of mtp while animating, fixed message field while animating
This commit is contained in:
@@ -352,6 +352,8 @@ namespace {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool _paused = false;
|
||||
|
||||
}
|
||||
|
||||
namespace _mtp_internal {
|
||||
@@ -371,6 +373,10 @@ namespace _mtp_internal {
|
||||
sessions.insert(dcWithShift, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
bool paused() {
|
||||
return _paused;
|
||||
}
|
||||
|
||||
void registerRequest(mtpRequestId requestId, int32 dcWithShift) {
|
||||
{
|
||||
@@ -643,6 +649,7 @@ namespace MTP {
|
||||
(*i)->restart();
|
||||
}
|
||||
}
|
||||
|
||||
void restart(int32 dcMask) {
|
||||
if (!_started) return;
|
||||
|
||||
@@ -654,6 +661,19 @@ namespace MTP {
|
||||
}
|
||||
}
|
||||
|
||||
void pause() {
|
||||
if (!_started) return;
|
||||
_paused = true;
|
||||
}
|
||||
|
||||
void unpause() {
|
||||
if (!_started) return;
|
||||
_paused = false;
|
||||
for (Sessions::const_iterator i = sessions.cbegin(), e = sessions.cend(); i != e; ++i) {
|
||||
(*i)->unpaused();
|
||||
}
|
||||
}
|
||||
|
||||
void configure(int32 dc, int32 user) {
|
||||
if (_started) return;
|
||||
mtpSetDC(dc);
|
||||
|
Reference in New Issue
Block a user