-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
(fix UX) Library: add feedback to directory operations (add, remove, relink) #12436
Conversation
InvalidOrMissingDirectory, | ||
UnreadableDirectory, | ||
SqlError, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To reduce tr strings for the dialogs we could merge all ~Result
types and forward them to a dialog function in Library.
// TODO: Move this function out of the DAO | ||
QList<RelocatedTrack> relocateDirectory( | ||
std::pair<RelocateResult, QList<RelocatedTrack>> relocateDirectory( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also be a struct to make it more compact, but that appearantly that requires some extras to make it work with std::tie
in TrackCollection.
Didn't test it.
struct RelocateResult {
Result result;
QList<RelocatedTrack> trackList;
template<typename T, typename U>
operator std::tuple<T, U>();
};
…issing It is checked whether the new directory exists beforehand, therefor the checks below can not be tricked and no inconsistences should arise
8ac56eb
to
f1d2278
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and working as expected on PopOS 22.04/Wayland!
f1d2278
to
3889305
Compare
I rebased onto main to resolve the conflicts (should have merged main instead : | ). |
argh, missed some comments. I'll revert to last good state and merge main. |
3889305
to
491cbf2
Compare
Done. |
Oh sorry, a conflict has developed after @acolombier review. |
This improves user feedback for library directory action in Library preferences (add, relink, remove) and when adding a directory in the Computer feature by showing appropriate message popups.
Fixes #10481