-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reload comics view - some fixes #219
Open
vedgy
wants to merge
4
commits into
YACReader:develop
Choose a base branch
from
vedgy:reload-comics-view-fixes
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vedgy
force-pushed
the
reload-comics-view-fixes
branch
from
February 27, 2021 10:23
ea04bc9
to
8b00ee8
Compare
I have implemented many more somewhat dependent fixes on top of this branch: https://github.com/vedgy/yacreader/commits/navigation-reloading-drag-fixes. I'll create a separate pull request after this one is merged. |
Merged
I don't see a scenario where this member function could be useful. Removing prevents calling it by mistake in place of YACReaderHistoryController::currentSourceContainer().
After the current order was assigned to comics while a reading list was selected or in search mode, the last selected folder's info was loaded. In the search mode case this made the UI look half-way between Normal and Searching navigation statuses. Now the last selected folder's or list's info or the last search result is reloaded. One issue remains: after the current order is assigned in search mode, the first comic in the search results is selected rather than the comic to which the first number was assigned. I don't know how to fix this. An alternative fix is to disable asignOrderAction while a reading list is selected and in search mode. But this is more difficult to implement and inconsistent with the other enabled-in-these-cases comic actions. Disabling the action would also remove the existing possibly useful feature of assigning numbers across directories.
This commit fixes two bugs: 1. When the current reading list is deselected by clicking outside of all rows in YACReaderReadingListsView, the reading list is still loaded and active in the comics view. Triggering the *Delete selected comics* action deletes the selected comics from disk rather than from the current label/list then. 2. The meaning of the *Delete selected comics* action in search mode depends on whether a reading list was (and still is) selected when the search mode was entered. Now the comics are deleted from the current label/list if and only if a reading list is loaded in the comics view. It doesn't make sense to delete comics from some reading list in search mode, so deletion from disk occurs, as well as when a folder is loaded in the comics view.
Wherever YACReaderNavigationController::reselectCurrentSource() was called, simply reloading the comics view is sufficient: when a dialog is accepted or when the last comic is deleted from the current reading list. Similarly there is no need to reselect the current folder when the last comic is deleted from the current folder. Simply reloading the comics view saves some work. In addition, in all changed places forward navigation history entries were cut off and lost because of the call to YACReaderHistoryController::updateHistory() in selectedFolder() or selectedList(). Now that reselectCurrentSource() is not used anymore, it can be safely removed rather than fixed. Its implementation suffered from two bugs: 1. Checking whether a reading list is selected is not reliable, because a reading list can be deselected but not unloaded by clicking outside of all rows in YACReaderReadingListsView. 2. It didn't account for the possibility of active search mode.
vedgy
force-pushed
the
reload-comics-view-fixes
branch
from
March 21, 2021 08:07
8b00ee8
to
68e5b02
Compare
luisangelsm
force-pushed
the
develop
branch
from
September 15, 2024 13:50
6ccfc51
to
63fcde8
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See the commit messages for details.