-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Modernize storage list #831
Conversation
TODO:
|
Co-authored-by: Naglis Jonaitis <[email protected]>
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.
Really nice rework of the storage list! If we find a solution for the deletion of the entries in the db I think this is ready to get merged :)
|
||
model.delete() | ||
self._model.invalidate() | ||
self.emit_event("storage-removed", model) |
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.
When removing a storage location we previously also removed all files from our db that originated from this location. This is currently handled by the _on_settings_event
function in the library_view_model
. I think we propably should move the deletion of the db entries from the library_view_model
to the storages_view_model
. But I'm not sure if we need to do something additional that the UI get's updated correctly.
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.
Done. Seems like updating the UI works fine.
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.
I guess this also fixes #151 then?
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.
Awesome :) I'll test it again and will close the issue if it's resolved :)
Modernize storage list, so that it uses libadwaita widgets, works correctly on mobile and some other stuff.
In the process I also refactored the storages part of the settings view model into its own VM.
Ohh, and another change for the fadeout settings row in 9693858