mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
fix: make it compile
This commit is contained in:
parent
77d52bb1b3
commit
cfa007de84
5 changed files with 12 additions and 27 deletions
|
@ -914,12 +914,6 @@ void Updates::updateOnline(crl::time lastNonIdleTime, bool gotOtherOffline) {
|
||||||
bool isOnlineOrig = Core::App().hasActiveWindow(&session());
|
bool isOnlineOrig = Core::App().hasActiveWindow(&session());
|
||||||
bool isOnline = settings->sendOnlinePackets && isOnlineOrig;
|
bool isOnline = settings->sendOnlinePackets && isOnlineOrig;
|
||||||
|
|
||||||
// AyuGram sendOfflinePacketAfterOnline
|
|
||||||
if (settings->sendOfflinePacketAfterOnline && _lastWasOnline)
|
|
||||||
{
|
|
||||||
isOnline = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int updateIn = config.onlineUpdatePeriod;
|
int updateIn = config.onlineUpdatePeriod;
|
||||||
Assert(updateIn >= 0);
|
Assert(updateIn >= 0);
|
||||||
if (isOnline) {
|
if (isOnline) {
|
||||||
|
@ -974,24 +968,6 @@ void Updates::updateOnline(crl::time lastNonIdleTime, bool gotOtherOffline) {
|
||||||
updateIn = qMin(updateIn, int(_lastSetOnline + config.onlineUpdatePeriod - ms));
|
updateIn = qMin(updateIn, int(_lastSetOnline + config.onlineUpdatePeriod - ms));
|
||||||
Assert(updateIn >= 0);
|
Assert(updateIn >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// AyuGram sendOfflinePacketAfterOnline
|
|
||||||
if (settings->sendOfflinePacketAfterOnline)
|
|
||||||
{
|
|
||||||
session().api().requestFullPeer(session().user());
|
|
||||||
if (session().user()->onlineTill > base::unixtime::now())
|
|
||||||
{
|
|
||||||
DEBUG_LOG(("[AyuGram] User likely appeared online"));
|
|
||||||
|
|
||||||
_onlineRequest = api().request(MTPaccount_UpdateStatus(
|
|
||||||
MTP_bool(true)
|
|
||||||
)).send();
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG_LOG(("[AyuGram] Decreasing updateIn because of enabled features"));
|
|
||||||
updateIn = 1250;
|
|
||||||
}
|
|
||||||
|
|
||||||
_onlineTimer.callOnce(updateIn);
|
_onlineTimer.callOnce(updateIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,9 @@ void hide(not_null<HistoryItem *> item)
|
||||||
|
|
||||||
bool isHidden(PeerId peerId, MsgId messageId)
|
bool isHidden(PeerId peerId, MsgId messageId)
|
||||||
{
|
{
|
||||||
auto it = hiddenMessages.find(peerId);
|
const auto it = hiddenMessages.find(peerId);
|
||||||
if (it != hiddenMessages.end()) {
|
if (it != hiddenMessages.end()) {
|
||||||
return it->second.find(messageId) != it->second.end();
|
return it->second.contains(messageId);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -607,6 +607,12 @@ void InnerWidget::elementSendBotCommand(
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InnerWidget::elementSearchInList(
|
||||||
|
const QString &query,
|
||||||
|
const FullMsgId &context)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void InnerWidget::elementHandleViaClick(not_null<UserData *> bot)
|
void InnerWidget::elementHandleViaClick(not_null<UserData *> bot)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,6 +122,9 @@ public:
|
||||||
void elementSendBotCommand(
|
void elementSendBotCommand(
|
||||||
const QString &command,
|
const QString &command,
|
||||||
const FullMsgId &context) override;
|
const FullMsgId &context) override;
|
||||||
|
void elementSearchInList(
|
||||||
|
const QString &query,
|
||||||
|
const FullMsgId &context) override;
|
||||||
void elementHandleViaClick(not_null<UserData *> bot) override;
|
void elementHandleViaClick(not_null<UserData *> bot) override;
|
||||||
bool elementIsChatWide() override;
|
bool elementIsChatWide() override;
|
||||||
not_null<Ui::PathShiftGradient *> elementPathShiftGradient() override;
|
not_null<Ui::PathShiftGradient *> elementPathShiftGradient() override;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6fff803db5e301f89b3a6a8af8ec38f4dcf5d97c
|
Subproject commit d0b0f2aee9dac4cd13cf8a13bf4614dcd13bdd5b
|
Loading…
Add table
Reference in a new issue