From 57791eb188635da71db45ff421a369c3637bac9e Mon Sep 17 00:00:00 2001 From: Mihai-Cristian Condrea Date: Sat, 26 Oct 2024 09:26:01 +0300 Subject: [PATCH] Cleared the code and preparing for the release ASAP --- CHANGELOG.md | 11 +- app/build.gradle.kts | 5 +- .../d4rk/cleaner/data/datastore/DataStore.kt | 18 +-- .../model/ui/memorymanager/StorageInfo.kt | 8 +- .../data/model/ui/screens/UiHomeModel.kt | 8 +- .../com/d4rk/cleaner/ui/components/Buttons.kt | 5 +- .../d4rk/cleaner/ui/components/ProgressBar.kt | 2 +- .../components/navigation/NavigationHost.kt | 1 - .../ui/screens/analyze/AnalyzeScreen.kt | 19 ++- .../cleaner/ui/screens/home/HomeScreen.kt | 41 +++--- .../cleaner/ui/screens/home/HomeViewModel.kt | 121 ++++++++++-------- .../screens/home/repository/HomeRepository.kt | 12 -- .../HomeRepositoryImplementation.kt | 57 ++------- .../tabs/ManualModeComposable.kt | 2 +- .../screens/main/repository/MainRepository.kt | 1 - .../ui/screens/memory/MemoryManagerScreen.kt | 8 +- .../MemoryManagerRepositoryImplementation.kt | 6 +- .../ui/screens/trash/TrashViewModel.kt | 54 +++++--- .../cleaner/utils/cleaning/StorageUtils.kt | 8 +- app/src/main/res/values-bg-rBG/strings.xml | 7 - app/src/main/res/values-de-rDE/strings.xml | 7 - app/src/main/res/values-es-rGQ/strings.xml | 7 - app/src/main/res/values-fr-rFR/strings.xml | 7 - app/src/main/res/values-hi-rIN/strings.xml | 7 - app/src/main/res/values-hu-rHU/strings.xml | 7 - app/src/main/res/values-in-rID/strings.xml | 7 - app/src/main/res/values-it-rIT/strings.xml | 7 - app/src/main/res/values-ja-rJP/strings.xml | 7 - app/src/main/res/values-pl-rPL/strings.xml | 7 - app/src/main/res/values-ro-rRO/strings.xml | 7 - app/src/main/res/values-ru-rRU/strings.xml | 7 - app/src/main/res/values-sv-rSE/strings.xml | 7 - app/src/main/res/values-tr-rTR/strings.xml | 7 - app/src/main/res/values-uk-rUA/strings.xml | 7 - app/src/main/res/values-zh-rTW/strings.xml | 7 - app/src/main/res/values/strings.xml | 12 +- .../res/values/untranslatable_strings.xml | 2 +- gradle/libs.versions.toml | 2 +- 38 files changed, 188 insertions(+), 327 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1e659e..993ca72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,23 +4,24 @@ appealing user interface. - **New**: Implemented date-based filtering in the Analyze screen, allowing for easier file selection and management. -- **Patch**:Resolved an issue where APK installation from the App Manager was not functioning +- **Patch**: Resolved an issue where APK installation from the App Manager was not functioning correctly. -- **Patch**:Improved the "Select All" button behavior in the App Manager to ensure accurate state +- **Patch**: Improved the "Select All" button behavior in the App Manager to ensure accurate state representation. - **New**: Introduced loading indicators in the App Manager for a smoother and more informative experience. - **New**: Added messages to indicate when no apps or APKs are found. -- **Patch**:Optimized app loading speed in the App Manager through code refactoring and efficiency +- **Patch**: Optimized app loading speed in the App Manager through code refactoring and efficiency improvements. - **New**: Enabled real-time RAM usage monitoring in the Memory Manager. +- **New**: A new Trash screen has been added to provide more granular control over your device's storage. - **New**: Added a loading animation to the Memory Manager for visual feedback during data retrieval. - **New**: Introduced a new setting to customize the app's startup page, providing users with greater control over their initial experience. - **New**: Added an option to disable the bounce click effect for users who prefer a more traditional interaction style. -- **Patch**:Resolved an issue where language selection was not consistently applied. +- **Patch**: Resolved an issue where language selection was not consistently applied. - **New**: Added a snackbar notification for older Android versions when users copy device information from the About section. - **New**: Integrated haptic feedback for swipe gestures, enhancing the tactile response and user @@ -29,7 +30,7 @@ - **New**: Redesigned the Settings page, aligning it with the modern aesthetics of the Android 15 design system. - **Minor**: Backported the app to support devices running Android 6.0 and above. -- **Patch**:Fixed visual glitches within the App Manager. +- **Patch**: Fixed visual glitches within the App Manager. - **Major**: Restructured the app's code flow for improved organization and future extensibility. - **Major**: Implemented a robust error handling mechanism to gracefully manage unexpected situations and provide helpful feedback to users. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 584b006..4798963 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -8,13 +8,13 @@ plugins { } android { - compileSdk = 34 + compileSdk = 35 namespace = "com.d4rk.cleaner" defaultConfig { applicationId = "com.d4rk.cleaner" minSdk = 23 targetSdk = 35 - versionCode = 138 + versionCode = 139 versionName = "3.0.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" resourceConfigurations += listOf( @@ -64,6 +64,7 @@ android { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } + kotlinOptions { jvmTarget = "17" } diff --git a/app/src/main/kotlin/com/d4rk/cleaner/data/datastore/DataStore.kt b/app/src/main/kotlin/com/d4rk/cleaner/data/datastore/DataStore.kt index c09c4b4..12f005e 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/data/datastore/DataStore.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/data/datastore/DataStore.kt @@ -152,13 +152,11 @@ class DataStore(context : Context) { } private val lastScanTimestampKey = longPreferencesKey(name = "last_scan_timestamp") - val lastScanTimestamp : Flow = dataStore.data.map { preferences -> - preferences[lastScanTimestampKey] ?: 0L - } suspend fun saveLastScanTimestamp(timestamp : Long) { dataStore.edit { preferences -> preferences[lastScanTimestampKey] = timestamp + println("Cleaner for Android -> Saved timestamp: $timestamp") } } @@ -184,20 +182,6 @@ class DataStore(context : Context) { private val trashFilePathsKey = stringSetPreferencesKey("trash_file_paths") - val trashFilePaths: Flow>> = dataStore.data.map { preferences -> - preferences[trashFilePathsKey]?.mapNotNull { entry -> - val parts = entry.split("||") - if (parts.size == 2) { - Pair(parts[0] , parts[1]) - } - else { - println("Cleaner for Android -> Invalid entry in trashFilePaths: $entry. It should contain the '||' delimiter.") - null - } - }?.toSet() ?: emptySet() - - } - suspend fun addTrashFilePath(pathPair: Pair) { dataStore.edit { settings -> val currentPaths = settings[trashFilePathsKey] ?: emptySet() diff --git a/app/src/main/kotlin/com/d4rk/cleaner/data/model/ui/memorymanager/StorageInfo.kt b/app/src/main/kotlin/com/d4rk/cleaner/data/model/ui/memorymanager/StorageInfo.kt index a0db11a..ca5e233 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/data/model/ui/memorymanager/StorageInfo.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/data/model/ui/memorymanager/StorageInfo.kt @@ -1,8 +1,12 @@ package com.d4rk.cleaner.data.model.ui.memorymanager data class StorageInfo( - val totalStorage: Long = 0, + val storageUsageProgress: Float = 0f, val freeStorage: Long = 0, val usedStorage: Long = 0, - val storageBreakdown: Map = emptyMap() + val freeSpacePercentage: Int = 0, + val storageBreakdown: Map = emptyMap(), + val usedStorageFormatted: String = "", + val totalStorageFormatted: String = "", + val cleanedSpace: String = "0 KB" , ) \ No newline at end of file diff --git a/app/src/main/kotlin/com/d4rk/cleaner/data/model/ui/screens/UiHomeModel.kt b/app/src/main/kotlin/com/d4rk/cleaner/data/model/ui/screens/UiHomeModel.kt index 769021c..ae369f7 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/data/model/ui/screens/UiHomeModel.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/data/model/ui/screens/UiHomeModel.kt @@ -1,14 +1,12 @@ package com.d4rk.cleaner.data.model.ui.screens +import com.d4rk.cleaner.data.model.ui.memorymanager.StorageInfo import java.io.File data class UiHomeModel( - var storageUsageProgress : Float = 0f , - var usedStorageFormatted : String = "" , - var totalStorageFormatted : String = "" , + val storageInfo: StorageInfo = StorageInfo() , var analyzeState : UiAnalyzeModel = UiAnalyzeModel() , - var daysFromLastScan : Int = 0, - val cleanedSpace: String = "0 KB", + var daysFromLastScan : Int = 0 , var isRescanDialogVisible : Boolean = false , ) diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/components/Buttons.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/components/Buttons.kt index 437106e..669a1b4 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/components/Buttons.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/components/Buttons.kt @@ -2,6 +2,7 @@ package com.d4rk.cleaner.ui.components import android.view.SoundEffectConstants import android.view.View +import androidx.compose.foundation.basicMarquee import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -52,7 +53,7 @@ fun TwoRowButtons( modifier = Modifier.size(ButtonDefaults.IconSize) ) Spacer(Modifier.size(ButtonDefaults.IconSpacing)) - Text(text = stringResource(id = onStartButtonText)) + Text(text = stringResource(id = onStartButtonText), modifier = Modifier.basicMarquee()) } Spacer(Modifier.width(8.dp)) @@ -73,7 +74,7 @@ fun TwoRowButtons( modifier = Modifier.size(ButtonDefaults.IconSize) ) Spacer(Modifier.size(ButtonDefaults.IconSpacing)) - Text(text = stringResource(id = onEndButtonText)) + Text(text = stringResource(id = onEndButtonText), modifier = Modifier.basicMarquee()) } } } \ No newline at end of file diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/components/ProgressBar.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/components/ProgressBar.kt index f726dac..4fba601 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/components/ProgressBar.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/components/ProgressBar.kt @@ -99,7 +99,7 @@ fun CircularDeterminateIndicator( @Composable fun StorageProgressBar(storageInfo: StorageInfo) { val progress: Float = - (storageInfo.usedStorage.toFloat() / storageInfo.totalStorage.toFloat()).coerceIn( + (storageInfo.usedStorage.toFloat() / storageInfo.storageUsageProgress).coerceIn( 0f, 1f ) LinearProgressIndicator( diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/components/navigation/NavigationHost.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/components/navigation/NavigationHost.kt index ad3cf26..88e85d0 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/components/navigation/NavigationHost.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/components/navigation/NavigationHost.kt @@ -9,7 +9,6 @@ import androidx.compose.ui.Modifier import androidx.navigation.NavHostController import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable -import androidx.navigation.navDeepLink import com.d4rk.cleaner.constants.ui.bottombar.BottomBarRoutes import com.d4rk.cleaner.data.datastore.DataStore import com.d4rk.cleaner.data.model.ui.navigation.BottomNavigationScreen diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/analyze/AnalyzeScreen.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/analyze/AnalyzeScreen.kt index 15053c6..a1c0402 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/analyze/AnalyzeScreen.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/analyze/AnalyzeScreen.kt @@ -529,19 +529,23 @@ fun FileCard( onCheckedChange(checked) } , modifier = Modifier.align(Alignment.TopEnd)) - Text( - text = file.name , - maxLines = 1 , - overflow = TextOverflow.Ellipsis , + Box( modifier = Modifier .fillMaxWidth() - .basicMarquee() .background( color = Color.Black.copy(alpha = 0.4f) ) - .padding(8.dp) .align(Alignment.BottomCenter) - ) + ) { + Text( + text = file.name , + maxLines = 1 , + overflow = TextOverflow.Ellipsis , + modifier = Modifier + .basicMarquee() + .padding(8.dp) + ) + } } } } @@ -587,6 +591,7 @@ fun SelectAllComposable( Icon( imageVector = Icons.Filled.Check , contentDescription = null , + modifier = Modifier.size(18.dp) ) } } diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/HomeScreen.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/HomeScreen.kt index 1435f8c..9118d30 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/HomeScreen.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/HomeScreen.kt @@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -26,7 +25,6 @@ import androidx.compose.runtime.key import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalView import androidx.compose.ui.res.stringResource @@ -80,19 +78,19 @@ fun HomeScreen() { ) { if (! uiState.analyzeState.isAnalyzeScreenVisible) { - CircularDeterminateIndicator(progress = uiState.storageUsageProgress , + CircularDeterminateIndicator(progress = uiState.storageInfo.storageUsageProgress , modifier = Modifier .align(Alignment.TopCenter) .offset(y = 98.dp) , onClick = { viewModel.analyze() }) - LastScanInfo( + ExtraStorageInfo( modifier = Modifier .align(Alignment.BottomCenter) .padding(bottom = 16.dp) , - cleanedSpace = uiState.cleanedSpace , - daysFromLastScan = uiState.daysFromLastScan , + cleanedSpace = uiState.storageInfo.cleanedSpace , + freeSpace = "${uiState.storageInfo.freeSpacePercentage} %", ) } @@ -117,12 +115,11 @@ fun HomeScreen() { } @Composable -fun LastScanInfo( +fun ExtraStorageInfo( modifier : Modifier = Modifier , cleanedSpace : String , - daysFromLastScan : Int , + freeSpace : String , ) { - val context = LocalContext.current Row( modifier = modifier @@ -135,30 +132,34 @@ fun LastScanInfo( InfoColumn( title = stringResource(id = R.string.cleaned_space) , value = cleanedSpace , - isRecent = false + modifier = Modifier.weight(1f) ) VerticalDivider() InfoColumn( - title = stringResource(id = R.string.last_scan) , - value = context.getString(R.string.last_scan_days_ago , daysFromLastScan) , - isRecent = daysFromLastScan <= 2 + title = stringResource(id = R.string.free_space) , + value = freeSpace, + modifier = Modifier.weight(1f) ) } } @Composable -fun InfoColumn(title : String , value : String , isRecent : Boolean) { +fun InfoColumn( + title: String, + value: String, + modifier: Modifier = Modifier +) { Column( - horizontalAlignment = Alignment.CenterHorizontally , modifier = Modifier.wrapContentSize() + horizontalAlignment = Alignment.CenterHorizontally, + modifier = modifier ) { - Text(text = title , style = MaterialTheme.typography.bodySmall) + Text(text = title, style = MaterialTheme.typography.bodySmall) Text( - text = value , - style = MaterialTheme.typography.bodyMedium , - color = if (isRecent) Color.Green else MaterialTheme.colorScheme.onSurface , - maxLines = 2 , + text = value, + style = MaterialTheme.typography.bodyMedium, + maxLines = 2, overflow = TextOverflow.Ellipsis ) } diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/HomeViewModel.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/HomeViewModel.kt index 820a43a..58c3564 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/HomeViewModel.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/HomeViewModel.kt @@ -27,49 +27,51 @@ class HomeViewModel(application : Application) : BaseViewModel(application) { val uiState : StateFlow = _uiState init { - prepareScreenData() - } - - /** - * Loads initial screen data, including storage info and file types data. - */ - private fun prepareScreenData() { updateStorageInfo() populateFileTypesData() - loadCleanedSpaceAndLastScan() + loadCleanedSpace() } /** - * Updates the storage information in the UI state. + * Updates the storage information (used and total storage) in the UI state. */ private fun updateStorageInfo() { viewModelScope.launch(coroutineExceptionHandler) { repository.getStorageInfo { uiHomeModel -> _uiState.update { it.copy( - storageUsageProgress = uiHomeModel.storageUsageProgress , - usedStorageFormatted = uiHomeModel.usedStorageFormatted , - totalStorageFormatted = uiHomeModel.totalStorageFormatted + storageInfo = it.storageInfo.copy( + storageUsageProgress = uiHomeModel.storageInfo.storageUsageProgress , + freeSpacePercentage = uiHomeModel.storageInfo.freeSpacePercentage + ) ) } } } } - private fun loadCleanedSpaceAndLastScan() { + /** + * Loads the cleaned space and last scan information from DataStore and updates the UI state. + */ + private fun loadCleanedSpace() { viewModelScope.launch(coroutineExceptionHandler) { - repository.dataStore.cleanedSpace.collect { cleanedSpace -> - _uiState.update { it.copy(cleanedSpace = StorageUtils.formatSize(cleanedSpace)) } - } - - repository.getLastScanInfo { daysFromLastScan -> - _uiState.update { it.copy(daysFromLastScan = daysFromLastScan) } + with(repository) { + dataStore.cleanedSpace.collect { cleanedSpace -> + _uiState.update { + it.copy( + storageInfo = it.storageInfo.copy( + cleanedSpace = StorageUtils.formatSize(cleanedSpace) + ) + ) + } + } } } } /** - * Initiates file analysis and updates the UI state with the results. + * Analyzes files to find duplicates, empty folders, and other relevant information. + * Updates the UI state with the analysis results. */ fun analyze() { viewModelScope.launch(context = Dispatchers.Default + coroutineExceptionHandler) { @@ -151,7 +153,7 @@ class HomeViewModel(application : Application) : BaseViewModel(application) { areAllFilesSelected = when { newSelectedCount == currentUiState.analyzeState.scannedFileList.size && newSelectedCount > 0 -> true newSelectedCount == 0 -> false - isChecked -> currentUiState.analyzeState.areAllFilesSelected // Maintain 'select all' state if an item was checked and all were already checked + isChecked -> currentUiState.analyzeState.areAllFilesSelected else -> false } ) @@ -189,28 +191,28 @@ class HomeViewModel(application : Application) : BaseViewModel(application) { */ fun clean() { viewModelScope.launch(context = Dispatchers.Default + coroutineExceptionHandler) { + showLoading() val filesToDelete = _uiState.value.analyzeState.fileSelectionMap.filter { it.value }.keys - showLoading() - - val totalCleanedSpace = filesToDelete.sumOf { it.length() } // Calculate cleaned space - - repository.deleteFiles(filesToDelete) { - _uiState.update { currentUiState -> - currentUiState.copy(analyzeState = currentUiState.analyzeState.copy( - scannedFileList = currentUiState.analyzeState.scannedFileList.filterNot { - filesToDelete.contains(it) - } , - selectedFilesCount = 0 , - areAllFilesSelected = false , - fileSelectionMap = emptyMap() , - isAnalyzeScreenVisible = false , - )) + val clearedSpaceTotalSize = filesToDelete.sumOf { it.length() } + with(repository) { + deleteFiles(filesToDelete) { + _uiState.update { currentUiState -> + currentUiState.copy(analyzeState = currentUiState.analyzeState.copy( + scannedFileList = currentUiState.analyzeState.scannedFileList.filterNot { + filesToDelete.contains(it) + } , + selectedFilesCount = 0 , + areAllFilesSelected = false , + fileSelectionMap = emptyMap() , + isAnalyzeScreenVisible = false , + )) + } + updateStorageInfo() } - updateStorageInfo() - viewModelScope.launch(Dispatchers.IO) { - repository.dataStore.addCleanedSpace(totalCleanedSpace) - repository.dataStore.saveLastScanTimestamp(System.currentTimeMillis()) + with(dataStore) { + addCleanedSpace(clearedSpaceTotalSize) + saveLastScanTimestamp(System.currentTimeMillis()) } } hideLoading() @@ -225,20 +227,23 @@ class HomeViewModel(application : Application) : BaseViewModel(application) { showLoading() val filesToMove = _uiState.value.analyzeState.fileSelectionMap.filter { it.value }.keys.toList() - val totalTrashSize = filesToMove.sumOf { it.length() } - repository.moveToTrash(filesToMove) { - _uiState.update { currentUiState -> - currentUiState.copy(analyzeState = currentUiState.analyzeState.copy( - scannedFileList = currentUiState.analyzeState.scannedFileList.filterNot { existingFile -> - filesToMove.any { movedFile -> existingFile.absolutePath == movedFile.absolutePath } - } , - selectedFilesCount = 0 , - areAllFilesSelected = false , - fileSelectionMap = emptyMap())) + val totalFileSizeToMove = filesToMove.sumOf { it.length() } + with(repository) { + moveToTrash(filesToMove) { + _uiState.update { currentUiState -> + currentUiState.copy(analyzeState = currentUiState.analyzeState.copy( + scannedFileList = currentUiState.analyzeState.scannedFileList.filterNot { existingFile -> + filesToMove.any { movedFile -> existingFile.absolutePath == movedFile.absolutePath } + } , + selectedFilesCount = 0 , + areAllFilesSelected = false , + isAnalyzeScreenVisible = false , + fileSelectionMap = emptyMap())) + } + updateStorageInfo() } - updateStorageInfo() + addTrashSize(totalFileSizeToMove) } - repository.addTrashSize(totalTrashSize) hideLoading() } } @@ -265,8 +270,10 @@ class HomeViewModel(application : Application) : BaseViewModel(application) { * @param isVisible True to show the dialog, false to hide it. */ fun setDeleteForeverConfirmationDialogVisibility(isVisible : Boolean) { - _uiState.update { - it.copy(analyzeState = it.analyzeState.copy(isDeleteForeverConfirmationDialogVisible = isVisible)) + viewModelScope.launch(coroutineExceptionHandler) { + _uiState.update { + it.copy(analyzeState = it.analyzeState.copy(isDeleteForeverConfirmationDialogVisible = isVisible)) + } } } @@ -275,8 +282,10 @@ class HomeViewModel(application : Application) : BaseViewModel(application) { * @param isVisible True to show the dialog, false to hide it. */ fun setMoveToTrashConfirmationDialogVisibility(isVisible : Boolean) { - _uiState.update { - it.copy(analyzeState = it.analyzeState.copy(isMoveToTrashConfirmationDialogVisible = isVisible)) + viewModelScope.launch(coroutineExceptionHandler) { + _uiState.update { + it.copy(analyzeState = it.analyzeState.copy(isMoveToTrashConfirmationDialogVisible = isVisible)) + } } } } \ No newline at end of file diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/repository/HomeRepository.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/repository/HomeRepository.kt index d0496db..a53207b 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/repository/HomeRepository.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/repository/HomeRepository.kt @@ -7,7 +7,6 @@ import com.d4rk.cleaner.data.model.ui.screens.FileTypesData import com.d4rk.cleaner.data.model.ui.screens.UiHomeModel import com.d4rk.cleaner.utils.cleaning.FileScanner import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.flow.firstOrNull import kotlinx.coroutines.withContext import java.io.File @@ -36,17 +35,6 @@ class HomeRepository( } } - suspend fun getLastScanInfo(onSuccess : (Int) -> Unit) { - withContext(Dispatchers.IO) { - dataStore.lastScanTimestamp.firstOrNull()?.let { timestamp -> - val daysFromLastScan = calculateDaysSince(timestamp) - withContext(Dispatchers.Main) { - onSuccess(daysFromLastScan) - } - } - } - } - /** * Retrieves file types data from resources. * @param onSuccess Callback function to be invoked with the file types data. diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/repository/HomeRepositoryImplementation.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/repository/HomeRepositoryImplementation.kt index c5dcfb4..88a962d 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/repository/HomeRepositoryImplementation.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/home/repository/HomeRepositoryImplementation.kt @@ -5,12 +5,12 @@ import android.media.MediaScannerConnection import android.os.Environment import com.d4rk.cleaner.R import com.d4rk.cleaner.data.datastore.DataStore +import com.d4rk.cleaner.data.model.ui.memorymanager.StorageInfo import com.d4rk.cleaner.data.model.ui.screens.FileTypesData import com.d4rk.cleaner.data.model.ui.screens.UiHomeModel import com.d4rk.cleaner.utils.cleaning.StorageUtils import kotlinx.coroutines.flow.first import java.io.File -import java.util.concurrent.TimeUnit import kotlin.coroutines.resume import kotlin.coroutines.suspendCoroutine @@ -22,30 +22,21 @@ abstract class HomeRepositoryImplementation( private val trashDir = File(application.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS) , "Trash") - suspend fun getStorageInfo() : UiHomeModel { + suspend fun getStorageInfo(): UiHomeModel { return suspendCoroutine { continuation -> - StorageUtils.getStorageInfo(application) { used , total , usageProgress -> + StorageUtils.getStorageInfo(application) { _ , _ , _ , usageProgress , freeSpacePercentage -> continuation.resume( UiHomeModel( - storageUsageProgress = usageProgress , - usedStorageFormatted = used , - totalStorageFormatted = total , + storageInfo = StorageInfo( + storageUsageProgress = usageProgress, + freeSpacePercentage = freeSpacePercentage + ) ) ) } } } - fun calculateDaysSince(timestamp : Long) : Int { - if (timestamp == 0L) return 0 - - val currentTime = System.currentTimeMillis() - val differenceInMillis = currentTime - timestamp - val days = TimeUnit.MILLISECONDS.toDays(differenceInMillis).toInt() - - return days - } - suspend fun getFileTypesDataFromResources() : FileTypesData { return suspendCoroutine { continuation -> val apkExtensions = @@ -75,12 +66,9 @@ abstract class HomeRepositoryImplementation( fun deleteFiles(filesToDelete : Set) { filesToDelete.forEach { file -> if (file.exists()) { - println("Cleaner for Android -> Deleting file/directory: ${file.absolutePath}") file.deleteRecursively() - println("Cleaner for Android -> Deleted file/directory: ${file.absolutePath}") - } else { - println("Cleaner for Android -> File not found: ${file.absolutePath}") + // TODO: add a dialog if no file to delete found } } } @@ -95,10 +83,7 @@ abstract class HomeRepositoryImplementation( val originalPath = file.absolutePath val destination = File(trashDir , file.name) - println("Cleaner for Android -> Moving file: ${file.absolutePath} to ${destination.absolutePath}") - if (file.renameTo(destination)) { - println("Cleaner for Android -> File moved successfully") dataStore.addTrashFileOriginalPath(originalPath) dataStore.addTrashFilePath(originalPath to destination.absolutePath) @@ -110,30 +95,20 @@ abstract class HomeRepositoryImplementation( ) } else { - println("Cleaner for Android -> File move failed") + // TODO: Add a dialog for failed files at the end for moving to trash } } else { - println("Cleaner for Android -> File does not exist: ${file.absolutePath}") + // TODO: Add a dialog if the file does not exist for moving to trash } } } suspend fun restoreFromTrash(filesToRestore : Set) { - println("Cleaner for Android -> impl logic called") val originalPaths = dataStore.trashFileOriginalPaths.first() - println("Cleaner for Android -> Original paths from DataStore: $originalPaths") - val trashToOriginalMap = - dataStore.trashFilePaths.first().associate { it.second to it.first } - println("Cleaner for Android -> trashToOriginalMap: $trashToOriginalMap") - filesToRestore.forEach { file -> - println("Cleaner for Android -> Attempting to restore: ${file.absolutePath}") - if (file.exists()) { val originalPath = originalPaths.firstOrNull { File(it).name == file.name } - println("Cleaner for Android -> Original path found: $originalPath") - if (originalPath != null) { val destinationFile = File(originalPath) val destinationParent = destinationFile.parentFile @@ -142,10 +117,7 @@ abstract class HomeRepositoryImplementation( destinationParent.mkdirs() } - println("Cleaner for Android -> Restoring to: ${destinationFile.absolutePath}") - if (file.renameTo(destinationFile)) { - println("Cleaner for Android -> File restored successfully") dataStore.removeTrashFileOriginalPath(originalPath) dataStore.removeTrashFilePath(originalPath) MediaScannerConnection.scanFile( @@ -155,18 +127,15 @@ abstract class HomeRepositoryImplementation( ) } else { - println("Cleaner for Android -> File restore failed. Check if the file already exists or there is a permission issue.") // More informative message + // TODO: Add a dialog for failed files at the end } } else { - println("Cleaner for Android -> No original path found for ${file.name}. Restoring to Downloads.") val downloadsDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) val destinationFile = File(downloadsDir , file.name) if (file.renameTo(destinationFile)) { - println("Cleaner for Android -> File restored to Downloads successfully") - MediaScannerConnection.scanFile( application , arrayOf(destinationFile.absolutePath , file.absolutePath) , @@ -175,12 +144,12 @@ abstract class HomeRepositoryImplementation( ) } else { - println("Cleaner for Android -> File restore to Downloads failed") + // TODO: Add a dialog if the move to download has been failed } } } else { - println("Cleaner for Android -> File does not exist in trash: ${file.absolutePath}") + // TODO: Add a dialog if the file does not exist } } } diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/imageoptimizer/imageoptimizer/tabs/ManualModeComposable.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/imageoptimizer/imageoptimizer/tabs/ManualModeComposable.kt index f88e93c..5db724a 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/imageoptimizer/imageoptimizer/tabs/ManualModeComposable.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/imageoptimizer/imageoptimizer/tabs/ManualModeComposable.kt @@ -92,7 +92,7 @@ fun ManualModeScreen(viewModel: ImageOptimizerViewModel) { ) { Text( text = stringResource( - R.string.image_compressor_percentage_format, qualityValue.toInt() + R.string.percentage_format, qualityValue.toInt() ) ) Slider( diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/main/repository/MainRepository.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/main/repository/MainRepository.kt index ae5afe7..10cedb8 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/main/repository/MainRepository.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/main/repository/MainRepository.kt @@ -6,7 +6,6 @@ import android.os.Build import androidx.annotation.RequiresApi import com.d4rk.cleaner.data.datastore.DataStore import com.d4rk.cleaner.notifications.managers.AppUpdateNotificationsManager -import com.d4rk.cleaner.utils.cleaning.StorageUtils import com.google.android.play.core.appupdate.AppUpdateManager import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.first diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/memory/MemoryManagerScreen.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/memory/MemoryManagerScreen.kt index a18ded6..4090fd4 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/memory/MemoryManagerScreen.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/memory/MemoryManagerScreen.kt @@ -160,10 +160,10 @@ fun MemoryManagerComposable() { @Composable fun StorageInfoCard(storageInfo: StorageInfo) { - val progress: Float = if (storageInfo.totalStorage == 0L) { + val progress: Float = if (storageInfo.storageUsageProgress.toLong() == 0L) { 0f } else { - storageInfo.usedStorage.toFloat() / storageInfo.totalStorage.toFloat() + storageInfo.usedStorage.toFloat() / storageInfo.storageUsageProgress } Column( @@ -192,7 +192,7 @@ fun StorageInfoCard(storageInfo: StorageInfo) { label = stringResource(id = R.string.free), size = storageInfo.freeStorage ) StorageInfoText( - label = stringResource(id = R.string.total), size = storageInfo.totalStorage + label = stringResource(id = R.string.total), size = storageInfo.storageUsageProgress.toLong() ) } } @@ -294,7 +294,7 @@ fun RamInfoCard(ramInfo: RamInfo) { Spacer(modifier = Modifier.height(8.dp)) StorageProgressBar( StorageInfo( - totalStorage = ramInfo.totalRam, + storageUsageProgress = ramInfo.totalRam.toFloat(), usedStorage = ramInfo.usedRam, freeStorage = ramInfo.availableRam ) diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/memory/repository/MemoryManagerRepositoryImplementation.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/memory/repository/MemoryManagerRepositoryImplementation.kt index aced40b..18e8b07 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/memory/repository/MemoryManagerRepositoryImplementation.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/memory/repository/MemoryManagerRepositoryImplementation.kt @@ -19,15 +19,15 @@ import kotlin.math.pow abstract class MemoryManagerRepositoryImplementation(val application : Application) { - suspend fun getStorageInfo() : StorageInfo { + suspend fun getStorageInfo(): StorageInfo { return suspendCoroutine { continuation -> - StorageUtils.getStorageInfo(application) { used , total , _ -> + StorageUtils.getStorageInfo(application) { used , total , _ , _ , _ -> val usedStorageBytes : Double = (used.toDoubleOrNull() ?: 0.0) * 1024.0.pow(n = 3) val totalStorageBytes : Double = (total.toDoubleOrNull() ?: 0.0) * 1024.0.pow(n = 3) val storageBreakdown : Map = getStorageBreakdown(application) val storageInfo = StorageInfo( - totalStorage = totalStorageBytes.toLong() , + storageUsageProgress = totalStorageBytes.toFloat() , freeStorage = (totalStorageBytes - usedStorageBytes).toLong() , usedStorage = usedStorageBytes.toLong() , storageBreakdown = storageBreakdown diff --git a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/trash/TrashViewModel.kt b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/trash/TrashViewModel.kt index de75d47..d51efb8 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/trash/TrashViewModel.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/ui/screens/trash/TrashViewModel.kt @@ -12,6 +12,12 @@ import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.launch import java.io.File +/** + * ViewModel for the Trash screen. Manages the display and interaction with trashed files. + * + * @param application The application instance. + * @author Mihai-Cristian Condrea + */ class TrashViewModel(application : Application) : BaseViewModel(application) { private val repository = HomeRepository(DataStore(application) , application) private val _uiState = MutableStateFlow(UiTrashModel()) @@ -21,16 +27,23 @@ class TrashViewModel(application : Application) : BaseViewModel(application) { loadTrashItems() } + /** + * Loads the list of trashed files from the repository. + */ private fun loadTrashItems() { viewModelScope.launch(coroutineExceptionHandler) { showLoading() - val trashFiles = repository.getTrashFiles() - _uiState.value = _uiState.value.copy(trashFiles = trashFiles) + _uiState.value = _uiState.value.copy(trashFiles = repository.getTrashFiles()) hideLoading() } } - + /** + * Handles changes in file selection state. + * + * @param file The file whose selection state has changed. + * @param isChecked True if the file is selected, false otherwise. + */ fun onFileSelectionChange(file : File , isChecked : Boolean) { viewModelScope.launch(coroutineExceptionHandler) { val updatedSelections = _uiState.value.fileSelectionStates + (file to isChecked) @@ -39,35 +52,42 @@ class TrashViewModel(application : Application) : BaseViewModel(application) { } } + /** + * Restores selected files from the trash. + */ fun restoreFromTrash() { viewModelScope.launch(coroutineExceptionHandler) { - val filesToRestore = _uiState.value.fileSelectionStates.filter { it.value }.keys - println("Cleaner for Android -> restoreFromTrash() called") - - println("Cleaner for Android -> Files to restore: $filesToRestore") - showLoading() - + val filesToRestore = _uiState.value.fileSelectionStates.filter { it.value }.keys + val totalFileSizeToRestore = filesToRestore.sumOf { it.length() } repository.restoreFromTrash(filesToRestore) { loadTrashItems() } - repository.subtractTrashSize(filesToRestore.sumOf { it.length() }) + repository.subtractTrashSize(totalFileSizeToRestore) hideLoading() } } + /** + * Permanently deletes selected files from the trash. + */ fun clean() { viewModelScope.launch(context = Dispatchers.Default + coroutineExceptionHandler) { - val filesToDelete = _uiState.value.fileSelectionStates.filter { it.value }.keys - println("Cleaner for Android -> Starting clean. Files to delete: ${filesToDelete.joinToString { it.absolutePath }}") // Log files to be deleted showLoading() - println("Cleaner for Android -> Showing loading indicator") - repository.deleteFiles(filesToDelete) { - loadTrashItems() + val filesToDelete = _uiState.value.fileSelectionStates.filter { it.value }.keys + val totalFileSizeToDelete = filesToDelete.sumOf { it.length() } + with(repository) { + deleteFiles(filesToDelete) { + loadTrashItems() + } + + with(dataStore) { + subtractTrashSize(totalFileSizeToDelete) + addCleanedSpace(totalFileSizeToDelete) + saveLastScanTimestamp(System.currentTimeMillis()) + } } - repository.subtractTrashSize(filesToDelete.sumOf { it.length() }) hideLoading() - println("Cleaner for Android -> Hiding loading indicator") } } } \ No newline at end of file diff --git a/app/src/main/kotlin/com/d4rk/cleaner/utils/cleaning/StorageUtils.kt b/app/src/main/kotlin/com/d4rk/cleaner/utils/cleaning/StorageUtils.kt index 9265cac..f14c483 100644 --- a/app/src/main/kotlin/com/d4rk/cleaner/utils/cleaning/StorageUtils.kt +++ b/app/src/main/kotlin/com/d4rk/cleaner/utils/cleaning/StorageUtils.kt @@ -32,8 +32,8 @@ object StorageUtils { */ fun getStorageInfo( - context : Context , - callback : (used : String , total : String , usageProgress : Float) -> Unit , + context: Context, + callback: (used: String, total: String, totalSpace: Long, usageProgress: Float, freeSize: Int) -> Unit ) { val storageManager : StorageManager = context.getSystemService(Context.STORAGE_SERVICE) as StorageManager @@ -58,7 +58,9 @@ object StorageUtils { val totalFormatted : String = (totalSize / (1024.0 * 1024.0 * 1024.0)).roundToInt().toString() val usageProgress : Float = usedSize.toFloat() / totalSize.toFloat() - callback(usedFormatted , totalFormatted , usageProgress) + val freeSize = totalSize - usedSize + val freeSpacePercentage: Int = ((freeSize.toDouble() / totalSize.toDouble()) * 100).toInt() + callback(usedFormatted, totalFormatted, totalSize, usageProgress, freeSpacePercentage) } /** diff --git a/app/src/main/res/values-bg-rBG/strings.xml b/app/src/main/res/values-bg-rBG/strings.xml index 9207ed0..bb505e2 100644 --- a/app/src/main/res/values-bg-rBG/strings.xml +++ b/app/src/main/res/values-bg-rBG/strings.xml @@ -13,9 +13,6 @@ Отваряне на навигационното чекмедже Начало - %1$s/%2$s GB\nИзползвано - Анализиране - Почистване Бързо сканиране APK файлове Архиви @@ -28,8 +25,6 @@ Статус: Не са избрани файлове Избиране на всички - Сканиране отново? - Сигурни ли сте, че искате да сканирате отново? Файлът не е намерен. Не са намерени файлове Дейността не е намерена. @@ -45,7 +40,6 @@ Деинсталиране Споделяне Информация за приложението - Инсталирано" Инсталирай Сподели APK Няма инсталирани приложения @@ -280,7 +274,6 @@ Научете повече Затваряне? - Необходимо е рестартиране! Възникна мрежова грешка при проверка за актуализации Възникна грешка при проверка за актуализации Сигурни ли сте, че искате да излезете? diff --git a/app/src/main/res/values-de-rDE/strings.xml b/app/src/main/res/values-de-rDE/strings.xml index c53b4c4..0e6395e 100644 --- a/app/src/main/res/values-de-rDE/strings.xml +++ b/app/src/main/res/values-de-rDE/strings.xml @@ -13,9 +13,6 @@ Navigationslade öffnen Startseite - %1$s/%2$s GB\nVerwendet - Analysieren - Reinigen Schnellscan APKs Archive @@ -28,8 +25,6 @@ Status: Keine Dateien ausgewählt Alle auswählen - Neu scannen? - Sind Sie sicher, dass Sie erneut scannen möchten? Datei nicht gefunden. Aktivität nicht gefunden. Keine Dateien gefunden @@ -45,7 +40,6 @@ Deinstallieren Teilen App-Info - Installiert" Installieren APK teilen Keine Apps installiert @@ -280,7 +274,6 @@ Mehr erfahren Schließen? - Neustart erforderlich! Beim Überprüfen auf Updates ist ein Netzwerkfehler aufgetreten Beim Überprüfen auf Updates ist ein Fehler aufgetreten Sind Sie sicher, dass Sie beenden möchten? diff --git a/app/src/main/res/values-es-rGQ/strings.xml b/app/src/main/res/values-es-rGQ/strings.xml index 2a403f4..55833ea 100644 --- a/app/src/main/res/values-es-rGQ/strings.xml +++ b/app/src/main/res/values-es-rGQ/strings.xml @@ -13,9 +13,6 @@ Abrir el cajón de navegación Inicio - %1$s/%2$s GB\nUtilizado - Analizar - Limpiar Escaneo rápido APK Archivos @@ -29,8 +26,6 @@ Estado: No se seleccionaron archivos Seleccionar todo - ¿Volver a escanear? - ¿Estás seguro de que quieres escanear de nuevo? Archivo no encontrado. No se encontraron archivos Actividad no encontrada. @@ -46,7 +41,6 @@ Desinstalar Compartir Información de la aplicación - Instalado" Instalar Compartir APK No hay aplicaciones instaladas @@ -281,7 +275,6 @@ Más información ¿Cerrar? - ¡Se requiere reiniciar! Ocurrió un error de red al verificar las actualizaciones Ocurrió un error al verificar las actualizaciones ¿Estás seguro de que quieres salir? diff --git a/app/src/main/res/values-fr-rFR/strings.xml b/app/src/main/res/values-fr-rFR/strings.xml index a53506b..5254f0a 100644 --- a/app/src/main/res/values-fr-rFR/strings.xml +++ b/app/src/main/res/values-fr-rFR/strings.xml @@ -13,9 +13,6 @@ Ouvrir le tiroir de navigation Accueil - %1$s/%2$s Go\nUtilisé - Analyser - Nettoyer Analyse rapide APK Archives @@ -29,8 +26,6 @@ Statut: Aucun fichier sélectionné Tout sélectionner - Re-scanner? - Êtes-vous sûr de vouloir re-scanner? Fichier introuvable. Aucun fichier trouvé Activité introuvable. @@ -46,7 +41,6 @@ Désinstaller Partager Informations sur l’application - Installé" Installer Partager APK Aucune application installée @@ -281,7 +275,6 @@ En savoir plus Fermer? - Un redémarrage est nécessaire! Une erreur réseau s\'est produite lors de la recherche de mises à jour. Une erreur s\'est produite lors de la recherche de mises à jour. Êtes-vous sûr de vouloir quitter? diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index 1e4bfa0..b1ee24a 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -13,9 +13,6 @@ नेविगेशन ड्रॉअर खोलें होम - %1$s/%2$s GB\nइस्तेमाल हुआ - विश्लेषण करें - साफ करें त्वरित स्कैन APK पुरालेख @@ -28,8 +25,6 @@ स्थिति: कोई फ़ाइलें चयनित नहीं हैं सबका चयन करें - पुनः स्कैन करें? - क्या आप सुनिश्चित हैं कि आप फिर से स्कैन करना चाहते हैं? फ़ाइल नहीं मिली। कोई फ़ाइल नहीं मिली गतिविधि नहीं मिली। @@ -45,7 +40,6 @@ अनइंस्टॉल करें साझा करें ऐप जानकारी - स्थापित" इंस्टॉल करें APK साझा करें कोई ऐप इंस्टॉल नहीं हैं @@ -280,7 +274,6 @@ और जानें बंद करें? - पुनः प्रारंभ करने की आवश्यकता है! अपडेट की जाँच करते समय नेटवर्क त्रुटि हुई अपडेट की जाँच करते समय एक त्रुटि हुई क्या आप सुनिश्चित हैं कि आप बाहर निकलना चाहते हैं? diff --git a/app/src/main/res/values-hu-rHU/strings.xml b/app/src/main/res/values-hu-rHU/strings.xml index 29f2517..0829094 100644 --- a/app/src/main/res/values-hu-rHU/strings.xml +++ b/app/src/main/res/values-hu-rHU/strings.xml @@ -13,9 +13,6 @@ Navigációs fiók megnyitása Kezdőlap - %1$s/%2$s GB\nHasznált - Elemzés - Tisztítás Gyorskeresés APK-k Archívumok @@ -28,8 +25,6 @@ Állapot: Nincsenek kiválasztva fájlok Összes kijelölése - Újraellenőrzés? - Biztosan újra szeretnéd ellenőrizni? A fájl nem található. Nem található fájl Tevékenység nem található. @@ -45,7 +40,6 @@ Eltávolítás Megosztás Alkalmazásinformációk - Telepítve" Telepítés APK megosztása Nincsenek telepített alkalmazások @@ -280,7 +274,6 @@ Tudj meg többet Bezárás? - Újraindítás szükséges! Hálózati hiba történt a frissítések ellenőrzése során Hiba történt a frissítések ellenőrzése során Biztosan ki szeretne lépni? diff --git a/app/src/main/res/values-in-rID/strings.xml b/app/src/main/res/values-in-rID/strings.xml index e341993..76ad2d7 100644 --- a/app/src/main/res/values-in-rID/strings.xml +++ b/app/src/main/res/values-in-rID/strings.xml @@ -13,9 +13,6 @@ Buka laci navigasi Beranda - %1$s/%2$s GB\nDigunakan - Analisis - Bersihkan Pemindaian Cepat APK Arsip @@ -27,8 +24,6 @@ Status: Tidak ada file yang dipilih Pilih Semua - Pindai ulang? - Anda yakin ingin memindai lagi? File tidak ditemukan. Aktivitas tidak ditemukan. Tidak ada berkas yang ditemukan @@ -44,7 +39,6 @@ Copot pemasangan Bagikan Info aplikasi - Terpasang" Pasang Bagikan APK Tidak ada aplikasi yang terinstal @@ -279,7 +273,6 @@ Pelajari lebih lanjut Tutup? - Membutuhkan mulai ulang! Terjadi kesalahan jaringan saat memeriksa pembaruan Terjadi kesalahan saat memeriksa pembaruan Apakah Anda yakin ingin keluar? diff --git a/app/src/main/res/values-it-rIT/strings.xml b/app/src/main/res/values-it-rIT/strings.xml index 1c6f981..d9da733 100644 --- a/app/src/main/res/values-it-rIT/strings.xml +++ b/app/src/main/res/values-it-rIT/strings.xml @@ -13,9 +13,6 @@ Apri il cassetto di navigazione Home - %1$s/%2$s GB\nUtilizzato - Analizza - Pulisci Scansione rapida APK Archivi @@ -29,8 +26,6 @@ Stato: Nessun file selezionato Seleziona tutto - Scansionare di nuovo? - Sei sicuro di voler scansionare di nuovo? File non trovato. Nessun file trovato Attività non trovata. @@ -46,7 +41,6 @@ Disinstalla Condividi Info app - Installato" Installa Condividi APK Nessuna app installata @@ -281,7 +275,6 @@ Scopri di più Chiudere? - Richiedi riavvio! Errore di rete durante la ricerca di aggiornamenti Si è verificato un errore durante la ricerca di aggiornamenti Sei sicuro di voler uscire? diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml index 71c1096..79ec30d 100644 --- a/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/src/main/res/values-ja-rJP/strings.xml @@ -13,9 +13,6 @@ ナビゲーションドロワーを開く ホーム - %1$s/%2$s GB\n使用済み - 分析する - クリーン クイックスキャン APK アーカイブ @@ -27,8 +24,6 @@ ステータス: ファイルが選択されていません すべて選択 - 再スキャンしますか? - 再スキャンしてもよろしいですか? ファイルが見つかりません。 ファイルが見つかりません アクティビティが見つかりません。 @@ -44,7 +39,6 @@ アンインストール 共有 アプリ情報 - インストール済み" インストール APKを共有 インストールされているアプリはありません @@ -279,7 +273,6 @@ もっと詳しく知る 閉じる? - 再起動が必要です! 更新を確認中にネットワークエラーが発生しました 更新を確認中にエラーが発生しました 本当に終了しますか? diff --git a/app/src/main/res/values-pl-rPL/strings.xml b/app/src/main/res/values-pl-rPL/strings.xml index c78c899..4d5f618 100644 --- a/app/src/main/res/values-pl-rPL/strings.xml +++ b/app/src/main/res/values-pl-rPL/strings.xml @@ -13,9 +13,6 @@ Otwórz szufladę nawigacji Strona główna - %1$s/%2$s GB\nUżywane - Analizuj - Wyczyść Szybkie skanowanie APK Archiwa @@ -30,8 +27,6 @@ Status: Nie wybrano plików Zaznacz wszystko - Skanować ponownie? - Czy na pewno chcesz skanować ponownie? Plik nie znaleziony. Nie znaleziono plików Nie znaleziono aktywności. @@ -47,7 +42,6 @@ Odinstaluj Udostępnij Informacje o aplikacji - Zainstalowano" Zainstaluj Udostępnij APK Brak zainstalowanych aplikacji @@ -282,7 +276,6 @@ Dowiedz się więcej Zamknąć? - Wymagane ponowne uruchomienie! Wystąpił błąd sieci podczas sprawdzania aktualizacji Wystąpił błąd podczas sprawdzania aktualizacji Czy na pewno chcesz wyjść? diff --git a/app/src/main/res/values-ro-rRO/strings.xml b/app/src/main/res/values-ro-rRO/strings.xml index c93b28e..a1e1815 100644 --- a/app/src/main/res/values-ro-rRO/strings.xml +++ b/app/src/main/res/values-ro-rRO/strings.xml @@ -13,9 +13,6 @@ Deschide sertarul de navigare Acasă - %1$s/%2$s GB\nUtilizat - Analizează - Curăță Scanare rapidă APK-uri Arhive @@ -29,8 +26,6 @@ Stare: Niciun fișier selectat Selectează tot - Rescanare? - Sunteți sigur că doriți să scanați din nou? Fișierul nu a fost găsit. Nu s-au găsit fișiere Activitatea nu a fost găsită. @@ -46,7 +41,6 @@ Dezinstalează Partajează Informații despre aplicație - Instalat" Instalează Partajează APK Nicio aplicație instalată @@ -281,7 +275,6 @@ Află mai multe Închide? - Este necesară o repornire! A apărut o eroare de rețea în timp ce se verificau actualizările A apărut o eroare în timp ce se verificau actualizările Sunteți sigur că doriți să ieșiți? diff --git a/app/src/main/res/values-ru-rRU/strings.xml b/app/src/main/res/values-ru-rRU/strings.xml index f130abe..f581f94 100644 --- a/app/src/main/res/values-ru-rRU/strings.xml +++ b/app/src/main/res/values-ru-rRU/strings.xml @@ -13,9 +13,6 @@ Открыть боковое меню навигации Домой - %1$s/%2$s ГБ\nИспользовано - Анализировать - Очистить Быстрое сканирование APK Архивы @@ -30,8 +27,6 @@ Статус: Файлы не выбраны Выбрать все - Повторное сканирование? - Вы уверены, что хотите выполнить сканирование снова? Файл не найден. Файлы не найдены Действие не найдено. @@ -47,7 +42,6 @@ Удалить Поделиться Информация о приложении - Установлено" Установить Поделиться APK Приложения не установлены @@ -282,7 +276,6 @@ Узнать больше Закрыть? - Требуется перезагрузка! Ошибка сети при проверке обновлений Произошла ошибка при проверке обновлений Вы уверены, что хотите выйти? diff --git a/app/src/main/res/values-sv-rSE/strings.xml b/app/src/main/res/values-sv-rSE/strings.xml index fecc210..a0056b7 100644 --- a/app/src/main/res/values-sv-rSE/strings.xml +++ b/app/src/main/res/values-sv-rSE/strings.xml @@ -13,9 +13,6 @@ Öppna navigeringslådan Hem - %1$s/%2$s GB\nAnvänt - Analysera - Rensa Snabbsökning APK:er Arkiv @@ -28,8 +25,6 @@ Status: Inga filer valda Välj alla - Skanna om? - Är du säker på att du vill skanna igen? Filen hittades inte. Inga filer hittades Aktiviteten hittades inte. @@ -45,7 +40,6 @@ Avinstallera Dela Appinformation - Installerad" Installera Dela APK Inga appar installerade @@ -280,7 +274,6 @@ Läs mer Stäng? - Kräver omstart! Nätverksfel uppstod vid kontroll av uppdateringar Ett fel uppstod vid kontroll av uppdateringar Är du säker på att du vill avsluta? diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index a293b96..b0d542e 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -13,9 +13,6 @@ Gezinme çekmecesini aç Ana Sayfa - %1$s/%2$s GB\nKullanılan - Analiz Et - Temizle Hızlı Tarama APK\'lar Arşivler @@ -28,8 +25,6 @@ Durum: Dosya seçilmedi Tümünü Seç - Tekrar Tara? - Tekrar taramak istediğinizden emin misiniz? Dosya bulunamadı. Dosya bulunamadı Etkinlik bulunamadı. @@ -45,7 +40,6 @@ Kaldır Paylaş Uygulama bilgisi - Yüklü" Yükle APK\'yı Paylaş Yüklü uygulama yok @@ -280,7 +274,6 @@ Daha fazla bilgi edinin Kapat? - Yeniden başlatma gerekiyor! Güncellemeleri kontrol ederken ağ hatası oluştu Güncellemeleri kontrol ederken bir hata oluştu Çıkmak istediğinizden emin misiniz? diff --git a/app/src/main/res/values-uk-rUA/strings.xml b/app/src/main/res/values-uk-rUA/strings.xml index c8593f1..d0a4c4e 100644 --- a/app/src/main/res/values-uk-rUA/strings.xml +++ b/app/src/main/res/values-uk-rUA/strings.xml @@ -13,9 +13,6 @@ Відкрити панель навігації Головна - %1$s/%2$s ГБ\nВикористано - Аналізувати - Очистити Швидке сканування APK Архіви @@ -30,8 +27,6 @@ Статус: Не вибрано файлів Вибрати все - Пересканувати? - Ви впевнені, що хочете сканувати знову? Файл не знайдено. Файли не знайдено Дія не знайдена. @@ -47,7 +42,6 @@ Видалити Поділитися Інформація про програму - Встановлено" Встановити Поділитися APK Програми не встановлені @@ -282,7 +276,6 @@ Дізнатися більше Закрити? - Потрібне перезавантаження! Під час перевірки наявності оновлень сталася помилка мережі Під час перевірки наявності оновлень сталася помилка Ви впевнені, що хочете вийти? diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 354000f..ef33def 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -13,9 +13,6 @@ 開啟導航抽屜 首頁 - %1$s/%2$s GB\n已使用 - 分析 - 清理 快速掃描 APK 檔案 @@ -27,8 +24,6 @@ 狀態:未選取任何檔案 選取全部 - 重新掃描? - 您確定要再次掃描嗎? 找不到檔案。 找不到檔案 找不到活動。 @@ -44,7 +39,6 @@ 解除安裝 分享 應用程式資訊 - 已安裝" 安裝 分享 APK 沒有安裝任何應用程式 @@ -279,7 +273,6 @@ 了解更多 關閉? - 需要重新啟動! 檢查更新時發生網路錯誤 檢查更新時發生錯誤 您確定要退出嗎? diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 274420e..91a4f4a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -15,17 +15,13 @@ Home Delete forever Move to trash - Cleaned Space: - Last Scan: - %1$d days ago + Cleaned Space + Free Space Delete Forever Are you sure you want to delete these files forever? This action cannot be undone. Move to Trash Are you sure you want to move these files to the trash? - %1$s/%2$s GB\nUsed - Analyze - Clean Quick Scan APKs Archives @@ -39,8 +35,6 @@ Status: No files selected Select All - Rescan? - Are you sure you want to scan again? File not found. No files found Activity not found. @@ -56,7 +50,6 @@ Uninstall Share App info - Installed" Install" Share APK No apps installed @@ -297,7 +290,6 @@ Learn more Close? - Require restart! Network error occurred while checking for updates An error occurred while checking for updates Are you sure you want to exit? diff --git a/app/src/main/res/values/untranslatable_strings.xml b/app/src/main/res/values/untranslatable_strings.xml index 14bc197..f2a154e 100644 --- a/app/src/main/res/values/untranslatable_strings.xml +++ b/app/src/main/res/values/untranslatable_strings.xml @@ -1,7 +1,7 @@ Cleaner Cleaner for Android - %d%% + %d%% Feedback for Dear developer, Send mail using: diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f2871eb..cf7cd2f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ compressor = "3.0.1" constraintlayoutCompose = "1.0.1" coreSplashscreen = "1.0.1" datastoreCore = "1.1.1" -firebaseBom = "33.4.0" +firebaseBom = "33.5.1" kotlinxSerializationJson = "1.7.3" lifecycle = "2.8.6" volley = "1.2.1"