Fixed build for macOS.
This commit is contained in:
parent
64af456d29
commit
21f7cec781
|
@ -60,7 +60,7 @@ void ViewsManager::viewsIncrement() {
|
||||||
|
|
||||||
QVector<MTPint> ids;
|
QVector<MTPint> ids;
|
||||||
ids.reserve(i->second.size());
|
ids.reserve(i->second.size());
|
||||||
for (const auto msgId : i->second) {
|
for (const auto &msgId : i->second) {
|
||||||
ids.push_back(MTP_int(msgId));
|
ids.push_back(MTP_int(msgId));
|
||||||
}
|
}
|
||||||
const auto requestId = _api.request(MTPmessages_GetMessagesViews(
|
const auto requestId = _api.request(MTPmessages_GetMessagesViews(
|
||||||
|
|
|
@ -1761,7 +1761,7 @@ void ApiWrap::deleteAllFromUser(
|
||||||
? history->collectMessagesFromUserToDelete(from)
|
? history->collectMessagesFromUserToDelete(from)
|
||||||
: QVector<MsgId>();
|
: QVector<MsgId>();
|
||||||
const auto channelId = peerToChannel(channel->id);
|
const auto channelId = peerToChannel(channel->id);
|
||||||
for (const auto msgId : ids) {
|
for (const auto &msgId : ids) {
|
||||||
if (const auto item = _session->data().message(channelId, msgId)) {
|
if (const auto item = _session->data().message(channelId, msgId)) {
|
||||||
item->destroy();
|
item->destroy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,11 +256,25 @@ void Manager::Private::showNotification(
|
||||||
|
|
||||||
NSUserNotification *notification = [[[NSUserNotification alloc] init] autorelease];
|
NSUserNotification *notification = [[[NSUserNotification alloc] init] autorelease];
|
||||||
if ([notification respondsToSelector:@selector(setIdentifier:)]) {
|
if ([notification respondsToSelector:@selector(setIdentifier:)]) {
|
||||||
auto identifier = _managerIdString + '_' + QString::number(peer->id.value) + '_' + QString::number(msgId);
|
auto identifier = _managerIdString
|
||||||
|
+ '_'
|
||||||
|
+ QString::number(peer->id.value)
|
||||||
|
+ '_'
|
||||||
|
+ QString::number(msgId.bare);
|
||||||
auto identifierValue = Q2NSString(identifier);
|
auto identifierValue = Q2NSString(identifier);
|
||||||
[notification setIdentifier:identifierValue];
|
[notification setIdentifier:identifierValue];
|
||||||
}
|
}
|
||||||
[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 setUserInfo:
|
||||||
|
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
|
[NSNumber numberWithUnsignedLongLong:peer->session().uniqueId()],
|
||||||
|
@"session",
|
||||||
|
[NSNumber numberWithUnsignedLongLong:peer->id.value],
|
||||||
|
@"peer",
|
||||||
|
[NSNumber numberWithInt:msgId.bare],
|
||||||
|
@"msgid",
|
||||||
|
[NSNumber numberWithUnsignedLongLong:_managerId],
|
||||||
|
@"manager",
|
||||||
|
nil]];
|
||||||
|
|
||||||
[notification setTitle:Q2NSString(title)];
|
[notification setTitle:Q2NSString(title)];
|
||||||
[notification setSubtitle:Q2NSString(subtitle)];
|
[notification setSubtitle:Q2NSString(subtitle)];
|
||||||
|
|
Loading…
Reference in New Issue