Skip to content

Commit

Permalink
style: modified some comments and replaced flow{} by flowOf()
Browse files Browse the repository at this point in the history
  • Loading branch information
joragua committed Jan 23, 2025
1 parent 9dc49a2 commit 95ffa42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class FileDataStorageManager(
result
}

// To do: New_arch: Remove this and call usecase inside FilesViewModel
// To do: New_arch. Remove this and call usecase inside FilesViewModel
fun getFileById(id: Long): OCFile? = runBlocking(CoroutinesDispatcherProvider().io) {
val getFileByIdUseCase: GetFileByIdUseCase by inject()

Expand All @@ -100,7 +100,7 @@ class FileDataStorageManager(
listOf()
}

// New_arch: Remove this and call usecase inside FilesViewModel
// To do: New_arch. Remove this and call usecase inside FilesViewModel
fun getFolderImages(folder: OCFile?): List<OCFile> = runBlocking(CoroutinesDispatcherProvider().io) {
val getFolderImagesUseCase: GetFolderImagesUseCase by inject()

Expand All @@ -111,7 +111,7 @@ class FileDataStorageManager(
result ?: listOf()
}

// New_arch: Remove this and call usecase inside FilesViewModel
// To do: New_arch. Remove this and call usecase inside FilesViewModel
private fun getFolderContent(parentId: Long): List<OCFile> = runBlocking(CoroutinesDispatcherProvider().io) {
val getFolderContentUseCase: GetFolderContentUseCase by inject()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.flow.update
Expand Down Expand Up @@ -369,7 +369,7 @@ class MainFileListViewModel(
FileListOption.ALL_FILES -> retrieveFlowForAllFiles(currentFolderDisplayed, currentFolderDisplayed.owner)
FileListOption.SHARED_BY_LINK -> retrieveFlowForShareByLink(currentFolderDisplayed, currentFolderDisplayed.owner)
FileListOption.AV_OFFLINE -> retrieveFlowForAvailableOffline(currentFolderDisplayed, currentFolderDisplayed.owner)
FileListOption.SPACES_LIST -> flow {}
FileListOption.SPACES_LIST -> flowOf()
}.toFileListUiState(
currentFolderDisplayed,
fileListOption,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1351,8 +1351,7 @@ class FileDisplayActivity : FileActivity(),
}

is SynchronizeFileUseCase.SyncType.UploadEnqueued -> showSnackMessage(getString(R.string.upload_enqueued_msg))
null -> { // Nothing to do
}
null -> { /* Nothing to do */ }
}
}

Expand Down

0 comments on commit 95ffa42

Please sign in to comment.