mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-18 14:42:16 +03:00
Fixed Codacy errors
Signed-off-by: Smarshal21 <lcb2021048@iiitl.ac.in>
This commit is contained in:
parent
ec1108ccc4
commit
c173c70bd7
3 changed files with 11 additions and 10 deletions
|
@ -39,7 +39,6 @@ import androidx.emoji2.widget.EmojiTextView
|
|||
import com.nextcloud.talk.R
|
||||
import com.nextcloud.talk.ui.theme.ViewThemeUtils
|
||||
|
||||
|
||||
class ReactionAnimator(
|
||||
val context: Context,
|
||||
private val startPointView: RelativeLayout,
|
||||
|
@ -63,7 +62,6 @@ class ReactionAnimator(
|
|||
callReaction: CallReaction
|
||||
) {
|
||||
val reactionWrapper = getReactionWrapperView(callReaction)
|
||||
|
||||
val params = RelativeLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT
|
||||
|
@ -100,7 +98,6 @@ class ReactionAnimator(
|
|||
|
||||
val animatorWithFullAlpha = AnimatorSet()
|
||||
animatorWithFullAlpha.play(moveWithFullAlpha)
|
||||
|
||||
animatorWithFullAlpha.addListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
reactionsList.remove(callReaction)
|
||||
|
@ -183,6 +180,7 @@ class ReactionAnimator(
|
|||
private const val BOTTOM_MARGIN: Int = 5
|
||||
}
|
||||
}
|
||||
|
||||
data class CallReaction(
|
||||
var emoji: String,
|
||||
var userName: String
|
||||
|
|
|
@ -73,8 +73,6 @@ class MessageActionsDialog(
|
|||
|
||||
private lateinit var dialogMessageActionsBinding: DialogMessageActionsBinding
|
||||
|
||||
// private lateinit var popup: EmojiPopup
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this)
|
||||
|
@ -300,6 +298,7 @@ class MessageActionsDialog(
|
|||
|
||||
dialogMessageActionsBinding.menuTranslateMessage.visibility = getVisibility(visible)
|
||||
}
|
||||
|
||||
private fun initMenuShare(visible: Boolean) {
|
||||
if (visible) {
|
||||
dialogMessageActionsBinding.menuShare.setOnClickListener {
|
||||
|
@ -399,7 +398,6 @@ class MessageActionsDialog(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
companion object {
|
||||
private val TAG = MessageActionsDialog::class.java.simpleName
|
||||
private const val ACTOR_LENGTH = 6
|
||||
|
|
|
@ -141,7 +141,9 @@ class SetStatusDialogFragment : DialogFragment(), PredefinedStatusClickListener
|
|||
)
|
||||
predefinedStatusOverall.ocs?.data?.let { it1 -> predefinedStatusesList.addAll(it1) }
|
||||
|
||||
if (currentStatus?.messageIsPredefined == true && currentStatus?.messageId?.isNotEmpty() == true) {
|
||||
if (currentStatus?.messageIsPredefined == true &&
|
||||
currentStatus?.messageId?.isNotEmpty() == true
|
||||
) {
|
||||
val messageId = currentStatus!!.messageId
|
||||
selectedPredefinedStatus = predefinedStatusesList.firstOrNull { ps -> messageId == ps.id }
|
||||
}
|
||||
|
@ -454,7 +456,10 @@ class SetStatusDialogFragment : DialogFragment(), PredefinedStatusClickListener
|
|||
// The endpoint '/message/custom' expects a valid emoji as string or null
|
||||
val statusIcon = binding.emoji.text.toString().ifEmpty { null }
|
||||
|
||||
if (selectedPredefinedStatus == null || selectedPredefinedStatus!!.message != inputText || selectedPredefinedStatus!!.icon != binding.emoji.text.toString()) {
|
||||
if (selectedPredefinedStatus == null ||
|
||||
selectedPredefinedStatus!!.message != inputText ||
|
||||
selectedPredefinedStatus!!.icon != binding.emoji.text.toString()
|
||||
) {
|
||||
ncApi.setCustomStatusMessage(
|
||||
credentials, ApiUtils.getUrlForSetCustomStatus(currentUser?.baseUrl), statusIcon, inputText, clearAt
|
||||
).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
|
|
Loading…
Reference in a new issue