chore: reset selectedComicOpened when currentComicId changed

This commit is contained in:
Gary Wang 2024-11-18 00:19:54 +08:00
parent edb3338bc4
commit f0ff3da067
No known key found for this signature in database
GPG Key ID: 5D30A4F15EA78760

View File

@ -27,6 +27,10 @@ AppController::AppController(QObject *parent)
m_librariesModel->setItemRoleNames(LibraryItem::roleNames());
m_comicsModel->setItemRoleNames(ComicItem::roleNames());
m_foldersModel->setItemRoleNames(FolderItem::roleNames());
connect(this, &AppController::currentComicIdChanged, this, [this](){
// "selected" is "current"
setProperty("selectedComicOpened", false);
});
}
void AppController::connectServer(QUrl serverBaseUrl)