@@ -235,16 +235,24 @@ function formatProviderList(providers: ReadonlyArray<Pick<ServerProvider, "drive
235235}
236236
237237/**
238- * Provider settings has an Update button only for installs the server can
239- * update. The rest are updated by the app or tool that installed them.
238+ * Install and provider settings reach only installs the server can update.
239+ * The rest are updated by the app or tool that installed them, so they get
240+ * their own sentence whatever else the notice offers.
240241 */
241- function describeUpdatesWithoutOneClick ( providers : ReadonlyArray < ProviderUpdateCandidate > ) : string {
242- const fromSettings = providers . filter ( ( provider ) => provider . versionAdvisory . canUpdate ) ;
243- const manual = providers . filter ( ( provider ) => ! provider . versionAdvisory . canUpdate ) ;
242+ function describeInitialUpdates ( input : {
243+ readonly updateProviders : ReadonlyArray < ProviderUpdateCandidate > ;
244+ readonly oneClickProviders : ReadonlyArray < ProviderUpdateCandidate > ;
245+ } ) : string {
246+ const fromSettings = input . updateProviders . filter (
247+ ( provider ) => provider . versionAdvisory . canUpdate ,
248+ ) ;
249+ const manual = input . updateProviders . filter ( ( provider ) => ! provider . versionAdvisory . canUpdate ) ;
244250 return [
245- fromSettings . length > 0
246- ? `${ formatProviderList ( fromSettings ) } can be updated from provider settings.`
247- : null ,
251+ input . oneClickProviders . length > 0
252+ ? "Install the update now or review provider settings."
253+ : fromSettings . length > 0
254+ ? `${ formatProviderList ( fromSettings ) } can be updated from provider settings.`
255+ : null ,
248256 manual . length > 0
249257 ? `Update ${ formatProviderList ( manual ) } with the app or tool that installed ${ manual . length === 1 ? "it" : "them" } .`
250258 : null ,
@@ -261,10 +269,7 @@ export function getProviderUpdateInitialToastView(input: {
261269 phase : "initial" ,
262270 type : "warning" ,
263271 title : getProviderUpdateInitialToastTitle ( input . updateProviders ) ,
264- description :
265- input . oneClickProviders . length > 0
266- ? "Install the update now or review provider settings."
267- : describeUpdatesWithoutOneClick ( input . updateProviders ) ,
272+ description : describeInitialUpdates ( input ) ,
268273 } ;
269274}
270275
0 commit comments