mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fix build on macOS and Linux.
This commit is contained in:
parent
188070d03f
commit
a100048cce
5 changed files with 12 additions and 14 deletions
|
@ -142,7 +142,7 @@ void ScheduleGroupCallBox(
|
|||
};
|
||||
const auto max = [] {
|
||||
return base::unixtime::serialize(
|
||||
QDateTime(QDate::currentDate().addDays(8))) - 1;
|
||||
QDateTime(QDate::currentDate().addDays(8), QTime(0, 0))) - 1;
|
||||
};
|
||||
|
||||
// At least half an hour later, at zero minutes/seconds.
|
||||
|
|
|
@ -142,7 +142,8 @@ private:
|
|||
lt_date,
|
||||
rpl::single(langDayOfMonthFull(dateDay.date())),
|
||||
lt_time,
|
||||
rpl::single(time));
|
||||
rpl::single(time)
|
||||
) | rpl::type_erased();
|
||||
auto tomorrow = tr::lng_group_call_starts_short_tomorrow(
|
||||
lt_time,
|
||||
rpl::single(time));
|
||||
|
@ -156,7 +157,7 @@ private:
|
|||
std::min(tillAfter, kDay) * crl::time(1000)
|
||||
) | rpl::map([=] {
|
||||
return rpl::duplicate(exact);
|
||||
})) | rpl::flatten_latest();
|
||||
})) | rpl::flatten_latest() | rpl::type_erased();
|
||||
|
||||
auto tomorrowAndAfter = rpl::single(
|
||||
std::move(tomorrow)
|
||||
|
@ -164,7 +165,7 @@ private:
|
|||
std::min(tillToday, kDay) * crl::time(1000)
|
||||
) | rpl::map([=] {
|
||||
return rpl::duplicate(todayAndAfter);
|
||||
})) | rpl::flatten_latest();
|
||||
})) | rpl::flatten_latest() | rpl::type_erased();
|
||||
|
||||
auto full = rpl::single(
|
||||
rpl::duplicate(exact)
|
||||
|
@ -172,7 +173,7 @@ private:
|
|||
tillTomorrow * crl::time(1000)
|
||||
) | rpl::map([=] {
|
||||
return rpl::duplicate(tomorrowAndAfter);
|
||||
})) | rpl::flatten_latest();
|
||||
})) | rpl::flatten_latest() | rpl::type_erased();
|
||||
|
||||
if (tillTomorrow > 0) {
|
||||
return full;
|
||||
|
|
|
@ -502,8 +502,8 @@ void DcKeyCreator::dhClientParamsSend(not_null<Attempt*> attempt) {
|
|||
AuthKey::FillData(attempt->authKey, computedAuthKey);
|
||||
|
||||
auto auth_key_sha = openssl::Sha1(attempt->authKey);
|
||||
memcpy(&attempt->data.auth_key_aux_hash, auth_key_sha.data(), 8);
|
||||
memcpy(&attempt->data.auth_key_hash, auth_key_sha.data() + 12, 8);
|
||||
memcpy(&attempt->data.auth_key_aux_hash.v, auth_key_sha.data(), 8);
|
||||
memcpy(&attempt->data.auth_key_hash.v, auth_key_sha.data() + 12, 8);
|
||||
|
||||
const auto client_dh_inner = MTP_client_DH_inner_data(
|
||||
attempt->data.nonce,
|
||||
|
|
|
@ -16,9 +16,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <QtNetwork/QNetworkReply>
|
||||
#include <crl/crl_on_main.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <debugapi.h>
|
||||
|
||||
namespace SmartGlocal {
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ using Manager = Platform::Notifications::Manager;
|
|||
const auto my = Window::Notifications::Manager::NotificationId{
|
||||
.full = Manager::FullPeer{
|
||||
.sessionId = notificationSessionId,
|
||||
.peerId = notificationPeerId
|
||||
.peerId = PeerId(notificationPeerId)
|
||||
},
|
||||
.msgId = notificationMsgId
|
||||
};
|
||||
|
@ -260,11 +260,11 @@ void Manager::Private::showNotification(
|
|||
|
||||
NSUserNotification *notification = [[[NSUserNotification alloc] init] autorelease];
|
||||
if ([notification respondsToSelector:@selector(setIdentifier:)]) {
|
||||
auto identifier = _managerIdString + '_' + QString::number(peer->id) + '_' + QString::number(msgId);
|
||||
auto identifier = _managerIdString + '_' + QString::number(peer->id.value) + '_' + QString::number(msgId);
|
||||
auto identifierValue = Q2NSString(identifier);
|
||||
[notification setIdentifier:identifierValue];
|
||||
}
|
||||
[notification setUserInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:peer->session().uniqueId()],@"session",[NSNumber numberWithUnsignedLongLong:peer->id],@"peer",[NSNumber numberWithInt:msgId],@"msgid",[NSNumber numberWithUnsignedLongLong:_managerId],@"manager",nil]];
|
||||
[notification setUserInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:peer->session().uniqueId()],@"session",[NSNumber numberWithUnsignedLongLong:peer->id.value],@"peer",[NSNumber numberWithInt:msgId],@"msgid",[NSNumber numberWithUnsignedLongLong:_managerId],@"manager",nil]];
|
||||
|
||||
[notification setTitle:Q2NSString(title)];
|
||||
[notification setSubtitle:Q2NSString(subtitle)];
|
||||
|
@ -331,7 +331,7 @@ void Manager::Private::clearingThreadLoop() {
|
|||
return clearFromSessions.contains(notificationSessionId)
|
||||
|| clearFromPeers.contains(FullPeer{
|
||||
.sessionId = notificationSessionId,
|
||||
.peerId = notificationPeerId
|
||||
.peerId = PeerId(notificationPeerId)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue