NotificationsManager: Improve some comments
(as suggested by CLion)
This commit is contained in:
committed by
Tobias Fella
parent
0a7978f4f5
commit
76954c162a
@@ -170,16 +170,16 @@ bool NotificationsManager::shouldPostNotification(const QPointer<NeoChatConnecti
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the room is the current room and the application is active the notification
|
// If the room is the current room and the application is active, the notification
|
||||||
// should not be shown.
|
// should not be shown.
|
||||||
// This is setup so that if the application is inactive the notification will
|
// This is set up so that if the application is inactive, the notification will
|
||||||
// always be posted, even if the room is the current room.
|
// always be posted, even if the room is the current room.
|
||||||
if (RoomManager::instance().currentRoom() && room->id() == RoomManager::instance().currentRoom()->id()
|
if (RoomManager::instance().currentRoom() && room->id() == RoomManager::instance().currentRoom()->id()
|
||||||
&& QGuiApplication::applicationState() == Qt::ApplicationActive) {
|
&& QGuiApplication::applicationState() == Qt::ApplicationActive) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the notification timestamp is earlier than the initial timestamp assume
|
// If the notification timestamp is earlier than the initial timestamp, assume
|
||||||
// the notification is old and shouldn't be posted.
|
// the notification is old and shouldn't be posted.
|
||||||
const auto timestamp = notification["ts"_L1].toDouble();
|
const auto timestamp = notification["ts"_L1].toDouble();
|
||||||
if (timestamp < m_initialTimestamp[connection->user()->id()]) {
|
if (timestamp < m_initialTimestamp[connection->user()->id()]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user