mirror of
				https://github.com/SimpleMobileTools/Simple-Flashlight.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	Use compose version of CheckAppOnSdCard
				
					
				
			This commit is contained in:
		| @@ -31,6 +31,7 @@ import androidx.lifecycle.viewModelScope | |||||||
| import com.google.android.material.math.MathUtils | import com.google.android.material.math.MathUtils | ||||||
| import com.simplemobiletools.commons.compose.alert_dialog.AlertDialogState | import com.simplemobiletools.commons.compose.alert_dialog.AlertDialogState | ||||||
| import com.simplemobiletools.commons.compose.alert_dialog.rememberAlertDialogState | import com.simplemobiletools.commons.compose.alert_dialog.rememberAlertDialogState | ||||||
|  | import com.simplemobiletools.commons.compose.extensions.CheckAppOnSdCard | ||||||
| import com.simplemobiletools.commons.compose.extensions.onEventValue | import com.simplemobiletools.commons.compose.extensions.onEventValue | ||||||
| import com.simplemobiletools.commons.compose.theme.AppThemeSurface | import com.simplemobiletools.commons.compose.theme.AppThemeSurface | ||||||
| import com.simplemobiletools.commons.dialogs.ConfirmationDialog | import com.simplemobiletools.commons.dialogs.ConfirmationDialog | ||||||
| @@ -213,10 +214,10 @@ class MainActivity : ComponentActivity() { | |||||||
|                     }, |                     }, | ||||||
|                     moreAppsFromUs = ::launchMoreAppsFromUsIntent |                     moreAppsFromUs = ::launchMoreAppsFromUsIntent | ||||||
|                 ) |                 ) | ||||||
|             } |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         checkAppOnSDCard() |                 CheckAppOnSdCard() | ||||||
|  |             } | ||||||
|  |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     override fun onResume() { |     override fun onResume() { | ||||||
| @@ -257,13 +258,6 @@ class MainActivity : ComponentActivity() { | |||||||
|         startAboutActivity(R.string.app_name, 0, BuildConfig.VERSION_NAME, faqItems, true) |         startAboutActivity(R.string.app_name, 0, BuildConfig.VERSION_NAME, faqItems, true) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private fun checkAppOnSDCard() { |  | ||||||
|         if (!baseConfig.wasAppOnSDShown && isAppInstalledOnSDCard()) { |  | ||||||
|             baseConfig.wasAppOnSDShown = true |  | ||||||
|             ConfirmationDialog(this, "", R.string.app_on_sd_card, R.string.ok, 0) {} |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private fun toggleStroboscope(isSOS: Boolean, launcher: ManagedActivityResultLauncher<String, Boolean>) { |     private fun toggleStroboscope(isSOS: Boolean, launcher: ManagedActivityResultLauncher<String, Boolean>) { | ||||||
|         // use the old Camera API for stroboscope, the new Camera Manager is way too slow |         // use the old Camera API for stroboscope, the new Camera Manager is way too slow | ||||||
|         if (isNougatPlus()) { |         if (isNougatPlus()) { | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ androidx-customView = "1.2.0-alpha02" | |||||||
| androidx-customViewPooling = "1.0.0" | androidx-customViewPooling = "1.0.0" | ||||||
| androidx-lifecycle = "2.7.0-alpha02" | androidx-lifecycle = "2.7.0-alpha02" | ||||||
| #Simple tools | #Simple tools | ||||||
| simple-commons = "b72ded2a75" | simple-commons = "543593cc03" | ||||||
| #Compose | #Compose | ||||||
| composeActivity = "1.8.0-rc01" | composeActivity = "1.8.0-rc01" | ||||||
| compose = "1.6.0-alpha06" | compose = "1.6.0-alpha06" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user