Skip to content

Commit

Permalink
Fix kotlin spotless check
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 authored and AndyScherzinger committed Oct 30, 2023
1 parent 03935a9 commit f0a9a11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@ import android.os.Parcelable
import java.io.Serializable

fun <T : Serializable?> Bundle.getSerializableArgument(key: String, type: Class<T>): T? {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
this.getSerializable(key, type)
else
} else {
@Suppress("UNCHECKED_CAST")
this.getSerializable(key) as T
}
}

fun <T : Parcelable?> Bundle.getParcelableArgument(key: String, type: Class<T>): T? {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
this.getParcelable(key, type)
else
} else {
this.getParcelable(key)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,11 @@ class FileDetailsSharingProcessFragment :
val resources = requireContext().resources

binding.shareProcessBtnNext.text = resources.getString(
if (shareType == ShareType.PUBLIC_LINK) R.string.share_copy_link
else R.string.common_confirm
if (shareType == ShareType.PUBLIC_LINK) {
R.string.share_copy_link
} else {
R.string.common_confirm
}
)

updateViewForShareType()
Expand Down

0 comments on commit f0a9a11

Please sign in to comment.