Skip to content
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

[nemo-qml-plugin-email] Add a getter to attachment sizes. #16

Merged
merged 2 commits into from Jan 12, 2024

Conversation

dcaliste
Copy link
Contributor

This property should be used in a for loop in EmailComposer.qml.

When re-editing a draft with an attachment, opening the attachment page raises a warning for a non existent fileSize property in the model. This is due to the fact that the model in this QML page is not an Email.AttachmentListModel but a plain QML ListModel, populated in the EmailComposer.qml page from an Email.AttachmentListModel, while the size property of the latter is not propagated to the former (under the name fileSize).

Copy link
Contributor

@pvuorela pvuorela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, already from consistency point of view as most of the roles as available via specific getters.

Now checking that list I noticed the last "Index" role which feels strange (index should be available without a role etc), but it doesn't either have handling in the ::data() method. Could remove? Looks like it was there on initial commit of the model.

@dcaliste
Copy link
Contributor Author

Thanks for the review, I've added a commit removing the Index role. Indeed, I've no idea what it can be used for. In case there is a use-case, it can still be readded.

@pvuorela pvuorela merged commit 10aed2c into sailfishos:master Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants