mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fixed build for macOS.
This commit is contained in:
parent
64af456d29
commit
21f7cec781
3 changed files with 18 additions and 4 deletions
|
@ -60,7 +60,7 @@ void ViewsManager::viewsIncrement() {
|
|||
|
||||
QVector<MTPint> ids;
|
||||
ids.reserve(i->second.size());
|
||||
for (const auto msgId : i->second) {
|
||||
for (const auto &msgId : i->second) {
|
||||
ids.push_back(MTP_int(msgId));
|
||||
}
|
||||
const auto requestId = _api.request(MTPmessages_GetMessagesViews(
|
||||
|
|
|
@ -1761,7 +1761,7 @@ void ApiWrap::deleteAllFromUser(
|
|||
? history->collectMessagesFromUserToDelete(from)
|
||||
: QVector<MsgId>();
|
||||
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)) {
|
||||
item->destroy();
|
||||
}
|
||||
|
|
|
@ -256,11 +256,25 @@ void Manager::Private::showNotification(
|
|||
|
||||
NSUserNotification *notification = [[[NSUserNotification alloc] init] autorelease];
|
||||
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);
|
||||
[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 setSubtitle:Q2NSString(subtitle)];
|
||||
|
|
Loading…
Add table
Reference in a new issue