@ -501,8 +501,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
var errorBaseGame = 0
var errorBaseGame = 0
var errorExtension = 0
var errorExtension = 0
var errorOther = 0
var errorOther = 0
var errorTotal = 0
lifecycleScope . launch {
documents . forEach {
documents . forEach {
when ( NativeLibrary . installFileToNand ( it . toString ( ) ) ) {
when ( NativeLibrary . installFileToNand ( it . toString ( ) ) ) {
NativeLibrary . InstallFileToNandResult . Success -> {
NativeLibrary . InstallFileToNandResult . Success -> {
@ -526,7 +524,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
}
}
}
}
}
}
withContext ( Dispatchers . Main ) {
val separator = System . getProperty ( " line.separator " ) ?: " \n "
val separator = System . getProperty ( " line.separator " ) ?: " \n "
val installResult = StringBuilder ( )
val installResult = StringBuilder ( )
if ( installSuccess > 0 ) {
if ( installSuccess > 0 ) {
@ -547,7 +545,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
)
)
installResult . append ( separator )
installResult . append ( separator )
}
}
errorTotal = errorBaseGame + errorExtension + errorOther
val errorTotal : Int = errorBaseGame + errorExtension + errorOther
if ( errorTotal > 0 ) {
if ( errorTotal > 0 ) {
installResult . append ( separator )
installResult . append ( separator )
installResult . append (
installResult . append (
@ -577,20 +575,17 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
)
)
installResult . append ( separator )
installResult . append ( separator )
}
}
MessageDialogFragment . newInstance (
return @newInstance MessageDialogFragment . newInstance (
titleId = R . string . install _game _content _failure ,
titleId = R . string . install _game _content _failure ,
descriptionString = installResult . toString ( ) . trim ( ) ,
descriptionString = installResult . toString ( ) . trim ( ) ,
helpLinkId = R . string . install _game _content _help _link
helpLinkId = R . string . install _game _content _help _link
) . show ( supportFragmentManager , MessageDialogFragment . TAG )
)
} else {
} else {
MessageDialogFragment . newInstance (
return @newInstance MessageDialogFragment . newInstance (
titleId = R . string . install _game _content _success ,
titleId = R . string . install _game _content _success ,
descriptionString = installResult . toString ( ) . trim ( )
descriptionString = installResult . toString ( ) . trim ( )
) . show ( supportFragmentManager , MessageDialogFragment . TAG )
)
}
}
}
}
return @newInstance installSuccess + installOverwrite + errorTotal
} . show ( supportFragmentManager , IndeterminateProgressDialogFragment . TAG )
} . show ( supportFragmentManager , IndeterminateProgressDialogFragment . TAG )
}
}
}
}