Skip to content

Commit

Permalink
Cleaned code
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Boulongne <[email protected]>
  • Loading branch information
KevinBoulongne committed Jan 7, 2022
1 parent 4ddb681 commit a9ce468
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ class FileInfoActionsBottomSheetDialog : BottomSheetDialogFragment(), FileInfoAc
if (isResumed) {
mainViewModel.updateFolderColor(currentFile, color).observe(viewLifecycleOwner) { apiResponse ->
findNavController().popBackStack()
if (!apiResponse.isSuccess()) {
requireActivity().showSnackbar(apiResponse.translatedError)
}
if (!apiResponse.isSuccess()) requireActivity().showSnackbar(apiResponse.translatedError)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ class SecureLinkShareBottomSheetDialog : InformationBottomSheetDialog() {
packAvailability.isVisible = true
packAvailability.text = getString(R.string.allPackAvailability, getString(R.string.packs_solo_team_pro))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,7 @@ open class FileListFragment : Fragment(), SwipeRefreshLayout.OnRefreshListener {
BulkOperationType.COLOR_FOLDER -> {
if (color != null) {
mediator.addSource(
mainViewModel.updateFolderColor(
file,
color,
),
mainViewModel.updateFolderColor(file, color),
mainViewModel.updateMultiSelectMediator(mediator),
)
}
Expand Down Expand Up @@ -590,7 +587,7 @@ open class FileListFragment : Fragment(), SwipeRefreshLayout.OnRefreshListener {
putExtra(SelectFolderActivity.USER_DRIVE_ID_TAG, AccountUtils.currentDriveId)
putExtra(
SelectFolderActivity.CUSTOM_ARGS_TAG,
bundleOf(BULK_OPERATION_CUSTOM_TAG to BulkOperationType.COPY)
bundleOf(BULK_OPERATION_CUSTOM_TAG to BulkOperationType.COPY),
)
}
startActivityForResult(intent, SelectFolderActivity.SELECT_FOLDER_REQUEST)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ class PreviewSliderFragment : Fragment(), FileInfoActionsView.OnItemClickListene
if (isResumed) {
mainViewModel.updateFolderColor(currentPreviewFile, color).observe(viewLifecycleOwner) { apiResponse ->
findNavController().popBackStack()
if (!apiResponse.isSuccess()) {
requireActivity().showSnackbar(apiResponse.translatedError)
}
if (!apiResponse.isSuccess()) requireActivity().showSnackbar(apiResponse.translatedError)
}
}
}
Expand Down

0 comments on commit a9ce468

Please sign in to comment.