Code Cleanup

This commit is contained in:
Prathamesh More 2021-10-09 17:52:03 +05:30
parent f8be0502ca
commit 5005e91b1c

View file

@ -19,8 +19,8 @@ class BackupViewModel : ViewModel() {
fun loadBackups() {
viewModelScope.launch {
File(BackupHelper.backupRootPath).listFiles { _, name ->
return@listFiles name.endsWith(BackupHelper.BACKUP_EXTENSION)
File(BackupHelper.backupRootPath).listFiles { file, _ ->
return@listFiles file.extension == BackupHelper.BACKUP_EXTENSION
}?.toList()?.let {
backupsMutableLiveData.value = it
}