@@ -188,47 +188,6 @@ bool StartupScenario::startupCompleted() const
188188 return m_startupCompleted;
189189}
190190
191- std::vector<QVariantMap> StartupScenario::welcomeDialogData () const
192- {
193- QVariantMap item1;
194- item1.insert (" title" , muse::qtrc (" appshell/welcome" , " Enjoy free cloud storage" ));
195- item1.insert (" imageUrl" , " qrc:/resources/welcomedialog/MuseScoreCom.png" );
196- item1.insert (" description" , muse::qtrc (" appshell/welcome" ,
197- " Save your scores privately on MuseScore.com to revisit past versions and invite others to view and comment – and when you’re ready, share your music with the world." ));
198- item1.insert (" buttonText" , muse::qtrc (" appshell/welcome" , " View my scores online" ));
199- item1.insert (" destinationUrl" ,
200- " https://musescore.com/my-scores?utm_source=mss-app-welcome-musescore-com&utm_medium=mss-app-welcome-musescore-com&utm_campaign=mss-app-welcome-musescore-com" );
201-
202- QVariantMap item2;
203- item2.insert (" title" , muse::qtrc (" appshell/welcome" , " What’s new in MuseScore Studio" ));
204- item2.insert (" imageUrl" , " qrc:/resources/welcomedialog/WhatsNew.png" );
205- item2.insert (" description" , muse::qtrc (" appshell/welcome" ,
206- " Includes a new system for hiding empty staves, a new text editing widget, guitar notation improvements, engraving improvements and more." ));
207- item2.insert (" buttonText" , muse::qtrc (" appshell/welcome" , " Watch video" ));
208- item2.insert (" destinationUrl" ,
209- " https://www.youtube.com/watch?v=J2gY9CbMuoI&utm_source=mss-app-yt-4.6-release&utm_medium=mss-app-yt-4.6-release&utm_campaign=mss-app-yt-4.6-release" );
210-
211- QVariantMap item3;
212- item3.insert (" title" , muse::qtrc (" appshell/welcome" , " Install our free MuseSounds libraries" ));
213- item3.insert (" imageUrl" , " qrc:/resources/welcomedialog/MuseSounds.png" );
214- item3.insert (" description" , muse::qtrc (" appshell/welcome" ,
215- " Explore our collection of realistic sample libraries, including solo instruments, marching percussion, and full orchestra - available for free on MuseHub." ));
216- item3.insert (" buttonText" , muse::qtrc (" appshell/welcome" , " Get it on MuseHub" ));
217- item3.insert (" destinationUrl" ,
218- " https://www.musehub.com/free-musesounds?utm_source=mss-app-welcome-free-musesounds&utm_medium=mss-app-welcome-free-musesounds&utm_campaign=mss-app-welcome-free-musesounds&utm_id=mss-app-welcome-free-musesounds" );
219-
220- QVariantMap item4;
221- item4.insert (" title" , muse::qtrc (" appshell/welcome" , " Explore our tutorials" ));
222- item4.insert (" imageUrl" , " qrc:/resources/welcomedialog/ExploreTutorials.png" );
223- item4.insert (" description" , muse::qtrc (" appshell/welcome" ,
224- " We’ve put together a playlist of tutorials to help both beginners and experienced users get the most out of MuseScore Studio." ));
225- item4.insert (" buttonText" , muse::qtrc (" appshell/welcome" , " View tutorials" ));
226- item4.insert (" destinationUrl" ,
227- " https://www.youtube.com/playlist?list=PLTYuWi2LmaPECOZrC6bkPHBkYY9_WEexT&utm_source=mss-app-welcome-tutorials&utm_medium=mss-app-welcome-tutorials&utm_campaign=mss-app-welcome-tutorials&utm_id=mss-app-welcome-tutorials" );
228-
229- return { item1, item2, item3, item4 };
230- }
231-
232191StartupModeType StartupScenario::resolveStartupModeType () const
233192{
234193 if (m_startupScoreFile.isValid ()) {
@@ -266,20 +225,37 @@ void StartupScenario::onStartupPageOpened(StartupModeType modeType)
266225 } break ;
267226 }
268227
228+ m_activeUpdateCheckCount = 0 ;
229+
269230 if (appUpdateScenario () && appUpdateScenario ()->checkInProgress ()) {
231+ m_activeUpdateCheckCount++;
270232 appUpdateScenario ()->checkInProgressChanged ().onNotify (this , [this , modeType]() {
271- showStartupDialogsIfNeed (modeType);
272233 appUpdateScenario ()->checkInProgressChanged ().disconnect (this );
273- });
274- } else {
275- showStartupDialogsIfNeed (modeType);
234+ m_activeUpdateCheckCount--;
235+ showStartupDialogsIfNeed (modeType);
236+ }, Asyncable::Mode::SetReplace);
237+ }
238+
239+ if (museSoundsUpdateScenario () && museSoundsUpdateScenario ()->checkInProgress ()) {
240+ m_activeUpdateCheckCount++;
241+ museSoundsUpdateScenario ()->checkInProgressChanged ().onNotify (this , [this , modeType]() {
242+ museSoundsUpdateScenario ()->checkInProgressChanged ().disconnect (this );
243+ m_activeUpdateCheckCount--;
244+ showStartupDialogsIfNeed (modeType);
245+ }, Asyncable::Mode::SetReplace);
276246 }
247+
248+ showStartupDialogsIfNeed (modeType);
277249}
278250
279251void StartupScenario::showStartupDialogsIfNeed (StartupModeType modeType)
280252{
281253 TRACEFUNC ;
282254
255+ if (m_activeUpdateCheckCount != 0 ) {
256+ return ;
257+ }
258+
283259 // ! NOTE: The welcome dialog should not show if the first launch setup has not been completed, or if we're going
284260 // ! to show a MuseSounds update dialog (see ProjectActionsController::doFinishOpenProject). MuseSampler's update
285261 // ! dialog should be shown after the welcome dialog.
@@ -336,10 +312,8 @@ bool StartupScenario::shouldShowWelcomeDialog(StartupModeType modeType) const
336312 return false ;
337313 }
338314
339- if (museSoundsUpdateScenario ()) {
340- if (museSoundsUpdateScenario ()->checkInProgress () || museSoundsUpdateScenario ()->hasUpdate ()) {
341- return false ;
342- }
315+ if (museSoundsUpdateScenario () && museSoundsUpdateScenario ()->hasUpdate ()) {
316+ return false ;
343317 }
344318
345319 const Uri& startupUri = startupPageUri (modeType);
0 commit comments