mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Application->Sandbox, Messenger->Application.
This commit is contained in:
@@ -152,7 +152,7 @@ inline DcId maindc() {
|
||||
}
|
||||
|
||||
inline int32 dcstate(ShiftedDcId shiftedDcId = 0) {
|
||||
if (auto instance = MainInstance()) {
|
||||
if (const auto instance = MainInstance()) {
|
||||
return instance->dcstate(shiftedDcId);
|
||||
}
|
||||
return DisconnectedState;
|
||||
@@ -187,23 +187,33 @@ inline mtpRequestId send(
|
||||
}
|
||||
|
||||
inline void sendAnything(ShiftedDcId shiftedDcId = 0, TimeMs msCanWait = 0) {
|
||||
return MainInstance()->sendAnything(shiftedDcId, msCanWait);
|
||||
if (const auto instance = MainInstance()) {
|
||||
instance->sendAnything(shiftedDcId, msCanWait);
|
||||
}
|
||||
}
|
||||
|
||||
inline void cancel(mtpRequestId requestId) {
|
||||
return MainInstance()->cancel(requestId);
|
||||
if (const auto instance = MainInstance()) {
|
||||
instance->cancel(requestId);
|
||||
}
|
||||
}
|
||||
|
||||
inline void ping() {
|
||||
return MainInstance()->ping();
|
||||
if (const auto instance = MainInstance()) {
|
||||
instance->ping();
|
||||
}
|
||||
}
|
||||
|
||||
inline void killSession(ShiftedDcId shiftedDcId) {
|
||||
return MainInstance()->killSession(shiftedDcId);
|
||||
if (const auto instance = MainInstance()) {
|
||||
instance->killSession(shiftedDcId);
|
||||
}
|
||||
}
|
||||
|
||||
inline void stopSession(ShiftedDcId shiftedDcId) {
|
||||
return MainInstance()->stopSession(shiftedDcId);
|
||||
if (const auto instance = MainInstance()) {
|
||||
instance->stopSession(shiftedDcId);
|
||||
}
|
||||
}
|
||||
|
||||
inline int32 state(mtpRequestId requestId) { // < 0 means waiting for such count of ms
|
||||
|
Reference in New Issue
Block a user