Android: Update activity-ktx from 1.8.2 to 1.9.2

This commit is contained in:
Reg Tiangha 2024-09-07 13:56:45 -06:00 committed by OpenSauce04
parent 3f28efd8b2
commit e6636469d8
5 changed files with 6 additions and 6 deletions

View File

@ -162,7 +162,7 @@ android {
} }
dependencies { dependencies {
implementation("androidx.activity:activity-ktx:1.8.2") implementation("androidx.activity:activity-ktx:1.9.2")
implementation("androidx.appcompat:appcompat:1.7.0") implementation("androidx.appcompat:appcompat:1.7.0")
implementation("androidx.core:core-splashscreen:1.0.1") implementation("androidx.core:core-splashscreen:1.0.1")
implementation("androidx.documentfile:documentfile:1.0.1") implementation("androidx.documentfile:documentfile:1.0.1")

View File

@ -159,7 +159,7 @@ class HomeSettingsFragment : Fragment() {
R.string.select_lime3ds_user_folder, R.string.select_lime3ds_user_folder,
R.string.select_lime3ds_user_folder_home_description, R.string.select_lime3ds_user_folder_home_description,
R.drawable.ic_home, R.drawable.ic_home,
{ mainActivity.openLime3DSDirectory.launch(null) }, { mainActivity?.openLime3DSDirectory?.launch(null) },
details = homeViewModel.userDir details = homeViewModel.userDir
), ),
HomeSetting( HomeSetting(

View File

@ -60,7 +60,7 @@ class Lime3DSDirectoryDialogFragment : DialogFragment() {
} }
.setNegativeButton(android.R.string.cancel) { _: DialogInterface?, _: Int -> .setNegativeButton(android.R.string.cancel) { _: DialogInterface?, _: Int ->
if (!PermissionsHandler.hasWriteAccess(requireContext())) { if (!PermissionsHandler.hasWriteAccess(requireContext())) {
(requireActivity() as MainActivity).openLime3DSDirectory.launch(null) (requireActivity() as MainActivity)?.openLime3DSDirectory?.launch(null)
} }
} }
.show() .show()

View File

@ -26,7 +26,7 @@ class SelectUserDirectoryDialogFragment : DialogFragment() {
.setTitle(R.string.select_lime3ds_user_folder) .setTitle(R.string.select_lime3ds_user_folder)
.setMessage(R.string.cannot_skip_directory_description) .setMessage(R.string.cannot_skip_directory_description)
.setPositiveButton(android.R.string.ok) { _: DialogInterface, _: Int -> .setPositiveButton(android.R.string.ok) { _: DialogInterface, _: Int ->
mainActivity.openLime3DSDirectory.launch(null) mainActivity?.openLime3DSDirectory?.launch(null)
} }
.show() .show()
} }

View File

@ -300,7 +300,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
windowInsets windowInsets
} }
val openLime3DSDirectory = registerForActivityResult<Uri, Uri>( val openLime3DSDirectory = registerForActivityResult(
ActivityResultContracts.OpenDocumentTree() ActivityResultContracts.OpenDocumentTree()
) { result: Uri? -> ) { result: Uri? ->
if (result == null) { if (result == null) {
@ -337,4 +337,4 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
.build() .build()
) )
} }
} }