Fix code analytics warnings

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2023-10-20 13:37:31 +02:00 committed by Andy Scherzinger
parent f0daf75f88
commit 1339228e4b
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -99,6 +99,7 @@ class SendShareDialog : BottomSheetDialogFragment(R.layout.send_share_fragment),
return binding.root return binding.root
} }
@Suppress("MagicNumber")
private fun setupSendButtonRecyclerView() { private fun setupSendButtonRecyclerView() {
val sendIntent = createSendIntent(requireContext(), file!!) val sendIntent = createSendIntent(requireContext(), file!!)
val sendButtonDataList = setupSendButtonData(sendIntent) val sendButtonDataList = setupSendButtonData(sendIntent)
@ -120,6 +121,7 @@ class SendShareDialog : BottomSheetDialogFragment(R.layout.send_share_fragment),
viewThemeUtils?.platform?.colorViewBackground(binding.bottomSheet, ColorRole.SURFACE_VARIANT) viewThemeUtils?.platform?.colorViewBackground(binding.bottomSheet, ColorRole.SURFACE_VARIANT)
} }
@Suppress("MagicNumber")
private fun checkButtonVisibilities() { private fun checkButtonVisibilities() {
if (hideNcSharingOptions) { if (hideNcSharingOptions) {
binding.sendShareButtons.visibility = View.GONE binding.sendShareButtons.visibility = View.GONE
@ -194,7 +196,7 @@ class SendShareDialog : BottomSheetDialogFragment(R.layout.send_share_fragment),
if (file!!.isDown) { if (file!!.isDown) {
sendIntent.component = ComponentName(packageName, activityName) sendIntent.component = ComponentName(packageName, activityName)
requireActivity().startActivity(Intent.createChooser(sendIntent, getString(R.string.send))) requireActivity().startActivity(Intent.createChooser(sendIntent, getString(R.string.send)))
} else { // Download the file } else { // Download the file
Log_OC.d(TAG, file!!.remotePath + ": File must be downloaded") Log_OC.d(TAG, file!!.remotePath + ": File must be downloaded")
(requireActivity() as SendShareDialogDownloader) (requireActivity() as SendShareDialogDownloader)
.downloadFile(file, packageName, activityName) .downloadFile(file, packageName, activityName)
@ -268,7 +270,5 @@ class SendShareDialog : BottomSheetDialogFragment(R.layout.send_share_fragment),
dialogFragment.arguments = args dialogFragment.arguments = args
return dialogFragment return dialogFragment
} }
} }
} }