mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Fix reloading current folder content
Some checks failed
Build / Initialization (push) Has been cancelled
Build / Code Format Validation (push) Has been cancelled
Build / Linux (Qt6) (push) Has been cancelled
Build / Linux (Qt6 + 7zip) (push) Has been cancelled
Build / macOS (Qt6 Universal) (push) Has been cancelled
Build / Windows x64 (Qt6) (push) Has been cancelled
Build / Windows ARM64 (Qt6) (push) Has been cancelled
Build / Docker amd64 Image (push) Has been cancelled
Build / Docker arm64 Image (push) Has been cancelled
Build / Publish Dev Builds (push) Has been cancelled
Build / Publish Release (push) Has been cancelled
Build / Publish YACReader10 Pre-release Builds (push) Has been cancelled
Some checks failed
Build / Initialization (push) Has been cancelled
Build / Code Format Validation (push) Has been cancelled
Build / Linux (Qt6) (push) Has been cancelled
Build / Linux (Qt6 + 7zip) (push) Has been cancelled
Build / macOS (Qt6 Universal) (push) Has been cancelled
Build / Windows x64 (Qt6) (push) Has been cancelled
Build / Windows ARM64 (Qt6) (push) Has been cancelled
Build / Docker amd64 Image (push) Has been cancelled
Build / Docker arm64 Image (push) Has been cancelled
Build / Publish Dev Builds (push) Has been cancelled
Build / Publish Release (push) Has been cancelled
Build / Publish YACReader10 Pre-release Builds (push) Has been cancelled
Going from empty to content or content to empty was broken and the state was never updated until the folder was reselected.
This commit is contained in:
@ -12,7 +12,9 @@
|
||||
#include "library_window.h"
|
||||
#include "no_search_results_widget.h"
|
||||
#include "options_dialog.h"
|
||||
#include "reading_list_model.h"
|
||||
#include "yacreader_options_dialog.h"
|
||||
#include "yacreader_reading_lists_view.h"
|
||||
#include "yacreader_sidebar.h"
|
||||
|
||||
//--
|
||||
@ -72,27 +74,24 @@ QWidget *YACReaderContentViewsManager::containerWidget()
|
||||
|
||||
void YACReaderContentViewsManager::updateCurrentContentView()
|
||||
{
|
||||
libraryWindow->comicsModel->reload();
|
||||
if (libraryWindow->status == LibraryWindow::Searching) {
|
||||
auto currentWidget = comicsViewStack->currentWidget();
|
||||
|
||||
if (comicsViewStack->currentWidget() == folderContentView && libraryWindow->comicsModel->rowCount() > 0) {
|
||||
comicsView->reloadContent();
|
||||
showComicsView();
|
||||
libraryWindow->comicsModel->reload();
|
||||
|
||||
if (currentWidget == comicsView) {
|
||||
comicsView->reloadContent();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (comicsViewStack->currentWidget() == comicsView && libraryWindow->comicsModel->rowCount() == 0) {
|
||||
showFolderContentView();
|
||||
folderContentView->reloadContent();
|
||||
if (!libraryWindow->listsView->selectionModel()->selectedRows().isEmpty()) {
|
||||
auto currentListIndex = libraryWindow->listsModelProxy->mapToSource(libraryWindow->listsView->currentIndex());
|
||||
libraryWindow->navigationController->loadListInfo(currentListIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (comicsViewStack->currentWidget() == comicsView) {
|
||||
comicsView->reloadContent();
|
||||
}
|
||||
|
||||
if (comicsViewStack->currentWidget() == folderContentView) {
|
||||
folderContentView->reloadContent();
|
||||
}
|
||||
libraryWindow->navigationController->loadFolderInfo(libraryWindow->getCurrentFolderIndex());
|
||||
}
|
||||
|
||||
void YACReaderContentViewsManager::updateCurrentComicView()
|
||||
|
||||
Reference in New Issue
Block a user