Add Feature for #30850 Consistent Default Score Visibility #31290
+1
−3
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.
Resolves: #30850
Summary
Previously, when a user saved the same score to the cloud, the visibility setting for the previous save was reserved. However, when publishing that same score to MuseScore.com, the default visibility is always set to Public, requiring users to adjust it manually each time they publish it.

Therefore, the user requested a feature to ensure that the default visibility when publishing a score was consistent with the visibility of the same score when it was previously published to the website.
I then added this feature and conducted manual testing. Regardless of whether the app is restarted, the computer is restarted, or the score visibility is modified on the website, the score's default visibility remains consistent with the visibility of the version published on the website. If a user modifies the visibility during a republish, the default visibility would also be updated during subsequent republishes of the same score. The default visibility of different scores does not affect each other.
While discussing the original issue, we also considered a global default visibility option. However, I think it is more suitable for a separate preference-related feature, and I have included my detailed thoughts on this in the document:
https://docs.google.com/document/d/1FYUVtQuyvbf7FxFApWO06yTbfau6PLvMsaj-jRfR1yE/edit?usp=sharing
What I changed
At the code level, I simply removed an if condition.
Originally, in the
doAskCloudLocationmethod,default visibilitywas private forsave-to-cloud, but public forpublish to MuseScore.com. The code then checked if the score had ever been uploaded to the website. If so, an if condition would choose whether to update with the previous visibility:"if (!isPublishShare) { defaultVisibility = scoreInfo.val.visibility; }".This condition was true for
save-to-cloud, but false forpublish to MuseScore.com. I removed this if condition, ensuring that regardless of how the score is uploaded to the cloud, the default visibility remains consistent with the previously published score version.