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 committed Oct 24, 2023
1 parent b7dd84e commit 4169dd7
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 4169dd7

Please sign in to comment.