Make notifications more useful
- Refactor and cleanup code - Don't paginate through notifications - it spams the server with requests and realistically only contains anything relevant on startup after a long time, in which case you're going to lose some notification anyway - Only show newest notification for the respective room, closing the old notification if one exists - Only show text of this notification BUG: 475228
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "linkpreviewer.h"
|
||||
#include "neochatconfig.h"
|
||||
#include "neochatroom.h"
|
||||
#include "notificationsmanager.h"
|
||||
#include "roommanager.h"
|
||||
#include "spacehierarchycache.h"
|
||||
|
||||
@@ -66,6 +67,10 @@ void NeoChatConnection::connectSignals()
|
||||
});
|
||||
connect(this, &NeoChatConnection::syncDone, this, [this] {
|
||||
setIsOnline(true);
|
||||
|
||||
connect(this, &NeoChatConnection::syncDone, this, [this]() {
|
||||
NotificationsManager::instance().handleNotifications(this);
|
||||
});
|
||||
});
|
||||
connect(this, &NeoChatConnection::networkError, this, [this]() {
|
||||
setIsOnline(false);
|
||||
|
||||
Reference in New Issue
Block a user