mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
improve detekt and format kotlin code
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
500d651d69
commit
f17e892acd
@ -61,7 +61,6 @@ class MessageActionsDialog(
|
|||||||
|
|
||||||
private lateinit var popup: EmojiPopup
|
private lateinit var popup: EmojiPopup
|
||||||
|
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
dialogMessageActionsBinding = DialogMessageActionsBinding.inflate(layoutInflater)
|
dialogMessageActionsBinding = DialogMessageActionsBinding.inflate(layoutInflater)
|
||||||
@ -87,6 +86,11 @@ class MessageActionsDialog(
|
|||||||
BuildConfig.DEBUG
|
BuildConfig.DEBUG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
initEmojiMore()
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
private fun initEmojiMore() {
|
||||||
dialogMessageActionsBinding.emojiMore.setOnTouchListener { v, event ->
|
dialogMessageActionsBinding.emojiMore.setOnTouchListener { v, event ->
|
||||||
if (event.action == MotionEvent.ACTION_DOWN) {
|
if (event.action == MotionEvent.ACTION_DOWN) {
|
||||||
if (popup.isShowing) {
|
if (popup.isShowing) {
|
||||||
@ -247,11 +251,12 @@ class MessageActionsDialog(
|
|||||||
?.observeOn(AndroidSchedulers.mainThread())
|
?.observeOn(AndroidSchedulers.mainThread())
|
||||||
?.subscribe(object : Observer<GenericOverall> {
|
?.subscribe(object : Observer<GenericOverall> {
|
||||||
override fun onSubscribe(d: Disposable) {
|
override fun onSubscribe(d: Disposable) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onNext(@NonNull genericOverall: GenericOverall) {
|
override fun onNext(@NonNull genericOverall: GenericOverall) {
|
||||||
val statusCode = genericOverall.ocs.meta.statusCode
|
val statusCode = genericOverall.ocs.meta.statusCode
|
||||||
if (statusCode == 200 || statusCode == 201) {
|
if (statusCode == HTTP_OK || statusCode == HTTP_CREATED) {
|
||||||
chatController.updateAdapterAfterSendReaction(message, emoji)
|
chatController.updateAdapterAfterSendReaction(message, emoji)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -270,5 +275,7 @@ class MessageActionsDialog(
|
|||||||
private const val TAG = "MessageActionsDialog"
|
private const val TAG = "MessageActionsDialog"
|
||||||
private const val ACTOR_LENGTH = 6
|
private const val ACTOR_LENGTH = 6
|
||||||
private const val NO_PREVIOUS_MESSAGE_ID: Int = -1
|
private const val NO_PREVIOUS_MESSAGE_ID: Int = -1
|
||||||
|
private const val HTTP_OK: Int = 200
|
||||||
|
private const val HTTP_CREATED: Int = 201
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,6 +138,7 @@ class ShowReactionsDialog(
|
|||||||
?.observeOn(AndroidSchedulers.mainThread())
|
?.observeOn(AndroidSchedulers.mainThread())
|
||||||
?.subscribe(object : Observer<ReactionsOverall> {
|
?.subscribe(object : Observer<ReactionsOverall> {
|
||||||
override fun onSubscribe(d: Disposable) {
|
override fun onSubscribe(d: Disposable) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onNext(@NonNull reactionsOverall: ReactionsOverall) {
|
override fun onNext(@NonNull reactionsOverall: ReactionsOverall) {
|
||||||
@ -187,6 +188,7 @@ class ShowReactionsDialog(
|
|||||||
?.observeOn(AndroidSchedulers.mainThread())
|
?.observeOn(AndroidSchedulers.mainThread())
|
||||||
?.subscribe(object : Observer<GenericOverall> {
|
?.subscribe(object : Observer<GenericOverall> {
|
||||||
override fun onSubscribe(d: Disposable) {
|
override fun onSubscribe(d: Disposable) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onNext(@NonNull genericOverall: GenericOverall) {
|
override fun onNext(@NonNull genericOverall: GenericOverall) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
build:
|
build:
|
||||||
maxIssues: 96
|
maxIssues: 95
|
||||||
weights:
|
weights:
|
||||||
# complexity: 2
|
# complexity: 2
|
||||||
# LongParameterList: 1
|
# LongParameterList: 1
|
||||||
|
Loading…
Reference in New Issue
Block a user