mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
Simplify boolean expressions
Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
7c8722bfe4
commit
bb4bccbd08
@ -2073,7 +2073,7 @@ class ChatController(args: Bundle) :
|
|||||||
myFirstMessage = message
|
myFirstMessage = message
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (binding.popupBubbleView.isShown == true) {
|
if (binding.popupBubbleView.isShown) {
|
||||||
binding.popupBubbleView.hide()
|
binding.popupBubbleView.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2091,7 +2091,7 @@ class ChatController(args: Bundle) :
|
|||||||
if (Integer.toString(code).startsWith("2")) {
|
if (Integer.toString(code).startsWith("2")) {
|
||||||
myFirstMessage = message
|
myFirstMessage = message
|
||||||
|
|
||||||
if (binding.popupBubbleView.isShown == true) {
|
if (binding.popupBubbleView.isShown) {
|
||||||
binding.popupBubbleView.hide()
|
binding.popupBubbleView.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2425,7 +2425,7 @@ class ChatController(args: Bundle) :
|
|||||||
if (!binding.popupBubbleView.isShown) {
|
if (!binding.popupBubbleView.isShown) {
|
||||||
newMessagesCount = 1
|
newMessagesCount = 1
|
||||||
binding.popupBubbleView.show()
|
binding.popupBubbleView.show()
|
||||||
} else if (binding.popupBubbleView.isShown == true) {
|
} else if (binding.popupBubbleView.isShown) {
|
||||||
newMessagesCount++
|
newMessagesCount++
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -3088,7 +3088,7 @@ class ChatController(args: Bundle) :
|
|||||||
|
|
||||||
val isOlderThanSixHours = message
|
val isOlderThanSixHours = message
|
||||||
.createdAt
|
.createdAt
|
||||||
.before(Date(System.currentTimeMillis() - AGE_THREHOLD_FOR_DELETE_MESSAGE)) == true
|
.before(Date(System.currentTimeMillis() - AGE_THREHOLD_FOR_DELETE_MESSAGE))
|
||||||
|
|
||||||
return when {
|
return when {
|
||||||
!isUserAllowedByPrivileges -> false
|
!isUserAllowedByPrivileges -> false
|
||||||
|
Loading…
Reference in New Issue
Block a user