Skip to content

Commit

Permalink
The first version with support for empty files
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihai-Cristian Condrea committed Oct 9, 2024
1 parent 52c6dd7 commit 31b6564
Show file tree
Hide file tree
Showing 19 changed files with 282 additions and 242 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ object ExtensionsConstants {
const val GENERIC_EXTENSIONS = "generic_extensions"
const val ARCHIVE_EXTENSIONS = "archive_extensions"
const val APK_EXTENSIONS = "apk_extensions"
const val EMPTY_FOLDERS = "empty_folders"
const val IMAGE_EXTENSIONS = "image_extensions"
const val AUDIO_EXTENSIONS = "audio_extensions"
const val VIDEO_EXTENSIONS = "video_extensions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ data class UiHomeModel(
val storageTotal: String = "",
val showCleaningComposable: Boolean = false,
val scannedFiles: List<File> = emptyList(),
val emptyFolders: List<File> = emptyList(),
val allFilesSelected: Boolean = false,
val fileSelectionStates: Map<File, Boolean> = emptyMap(),
val selectedFileCount: Int = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fun ErrorAlertDialog(
) {
AlertDialog(
onDismissRequest = onDismiss,
title = { Text("Error") },
title = { Text(text = "Error") },
text = { Text(errorMessage) },
confirmButton = {
TextButton(onClick = onDismiss) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,21 +256,21 @@ fun AppItemComposable(
showMenu = false
}) {
DropdownMenuItem(modifier = Modifier.bounceClick(), text = {
Text(stringResource(id = R.string.uninstall))
Text(text = stringResource(id = R.string.uninstall))
}, onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
viewModel.uninstallApp(app.packageName)
})
DropdownMenuItem(
modifier = Modifier.bounceClick(),
text = { Text(stringResource(id = R.string.share)) },
text = { Text(text = stringResource(id = R.string.share)) },
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
viewModel.shareApp(app.packageName)
})
DropdownMenuItem(
modifier = Modifier.bounceClick(),
text = { Text(stringResource(id = R.string.app_info)) },
text = { Text(text = stringResource(id = R.string.app_info)) },
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
viewModel.openAppInfo(app.packageName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fun HelpComposable(activity : HelpActivity , viewModel : HelpViewModel) {
}

Scaffold(modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection) , topBar = {
LargeTopAppBar(title = { Text(stringResource(id = R.string.help)) }, navigationIcon = {
LargeTopAppBar(title = { Text(text = stringResource(id = R.string.help)) }, navigationIcon = {
IconButton(modifier = Modifier.bounceClick() , onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
activity.finish()
Expand All @@ -95,7 +95,7 @@ fun HelpComposable(activity : HelpActivity , viewModel : HelpViewModel) {
}) {
DropdownMenuItem(
modifier = Modifier.bounceClick() ,
text = { Text(stringResource(id = R.string.view_in_google_play_store)) },
text = { Text(text = stringResource(id = R.string.view_in_google_play_store)) },
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
IntentUtils.openUrl(
Expand All @@ -105,14 +105,14 @@ fun HelpComposable(activity : HelpActivity , viewModel : HelpViewModel) {
})
DropdownMenuItem(
modifier = Modifier.bounceClick() ,
text = { Text(stringResource(id = R.string.version_info)) },
text = { Text(text = stringResource(id = R.string.version_info)) },
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
showDialog.value = true
})
DropdownMenuItem(
modifier = Modifier.bounceClick() ,
text = { Text(stringResource(id = R.string.beta_program)) },
text = { Text(text = stringResource(id = R.string.beta_program)) },
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
IntentUtils.openUrl(
Expand All @@ -122,7 +122,7 @@ fun HelpComposable(activity : HelpActivity , viewModel : HelpViewModel) {
})
DropdownMenuItem(
modifier = Modifier.bounceClick() ,
text = { Text(stringResource(id = R.string.terms_of_service)) },
text = { Text(text = stringResource(id = R.string.terms_of_service)) },
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
IntentUtils.openUrl(
Expand All @@ -132,7 +132,7 @@ fun HelpComposable(activity : HelpActivity , viewModel : HelpViewModel) {
})
DropdownMenuItem(
modifier = Modifier.bounceClick() ,
text = { Text(stringResource(id = R.string.privacy_policy)) },
text = { Text(text = stringResource(id = R.string.privacy_policy)) },
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
IntentUtils.openUrl(
Expand All @@ -142,7 +142,7 @@ fun HelpComposable(activity : HelpActivity , viewModel : HelpViewModel) {
})
DropdownMenuItem(
modifier = Modifier.bounceClick() ,
text = { Text(stringResource(com.google.android.gms.oss.licenses.R.string.oss_license_title)) } ,
text = { Text(text = stringResource(com.google.android.gms.oss.licenses.R.string.oss_license_title)) } ,
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
IntentUtils.openActivity(
Expand Down Expand Up @@ -181,7 +181,7 @@ fun HelpComposable(activity : HelpActivity , viewModel : HelpViewModel) {
}
}
ExtendedFloatingActionButton(
text = { Text(stringResource(id = R.string.feedback)) } ,
text = { Text(text = stringResource(id = R.string.feedback)) } ,
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
viewModel.reviewInfo.value?.let { safeReviewInfo ->
Expand Down
Loading

0 comments on commit 31b6564

Please sign in to comment.