mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 13:04:28 -04:00
Update the UI when a client synchronizes back the libraries
Only the top banners for now. TODO: ComicModel should also be updated.
This commit is contained in:
@ -273,6 +273,7 @@ void RequestMapper::serviceV2(HttpRequest &request, HttpResponse &response)
|
||||
VersionController().service(request, response);
|
||||
} else if (sync.exactMatch(path)) {
|
||||
SyncControllerV2().service(request, response);
|
||||
emit clientSync();
|
||||
} else {
|
||||
if (library.indexIn(path) != -1 && DBHelper::getLibraries().contains(library.cap(1).toInt())) {
|
||||
if (folderInfo.exactMatch(path)) {
|
||||
|
@ -21,6 +21,7 @@ public:
|
||||
void loadSessionV2(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response);
|
||||
|
||||
signals:
|
||||
void clientSync();
|
||||
void comicUpdated(qulonglong libraryId, qulonglong comicId);
|
||||
|
||||
private:
|
||||
|
@ -141,6 +141,7 @@ void YACReaderHttpServer::start(quint16 port)
|
||||
listener = new HttpListener(listenerSettings, requestMapper, app);
|
||||
|
||||
connect(requestMapper, &RequestMapper::comicUpdated, this, &YACReaderHttpServer::comicUpdated);
|
||||
connect(requestMapper, &RequestMapper::clientSync, this, &YACReaderHttpServer::clientSync);
|
||||
|
||||
if (listener->isListening()) {
|
||||
qDebug("ServiceHelper: Service has started");
|
||||
|
@ -20,6 +20,7 @@ public:
|
||||
QString getPort();
|
||||
|
||||
signals:
|
||||
void clientSync();
|
||||
void comicUpdated(qulonglong libraryId, qulonglong comicId);
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user