@@ -162,7 +162,6 @@ import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_INTERNAL_USER_ID
162
162
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_IS_BREAKOUT_ROOM
163
163
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_IS_MODERATOR
164
164
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_RECORDING_STATE
165
- import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ROOM_ID
166
165
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ROOM_TOKEN
167
166
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_START_CALL_AFTER_ROOM_SWITCH
168
167
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_SWITCH_TO_ROOM
@@ -187,7 +186,6 @@ import kotlinx.coroutines.withContext
187
186
import org.greenrobot.eventbus.Subscribe
188
187
import org.greenrobot.eventbus.ThreadMode
189
188
import retrofit2.HttpException
190
- import retrofit2.Response
191
189
import java.io.File
192
190
import java.io.IOException
193
191
import java.net.HttpURLConnection
@@ -291,6 +289,7 @@ class ChatActivity :
291
289
var newMessagesCount = 0
292
290
var startCallFromNotification: Boolean = false
293
291
var startCallFromRoomSwitch: Boolean = false
292
+
294
293
// lateinit var roomId: String
295
294
var voiceOnly: Boolean = true
296
295
private lateinit var path: String
@@ -600,7 +599,7 @@ class ChatActivity :
600
599
601
600
chatViewModel.loadMessages(
602
601
withCredentials = credentials!! ,
603
- withUrl = urlForChatting,
602
+ withUrl = urlForChatting
604
603
)
605
604
}
606
605
@@ -985,7 +984,8 @@ class ChatActivity :
985
984
986
985
if (newState == AbsListView .OnScrollListener .SCROLL_STATE_IDLE ) {
987
986
if (layoutManager!! .findFirstCompletelyVisibleItemPosition() > 0 &&
988
- ! binding.unreadMessagesPopup.isShown) {
987
+ ! binding.unreadMessagesPopup.isShown
988
+ ) {
989
989
binding.scrollDownButton.visibility = View .VISIBLE
990
990
} else {
991
991
binding.scrollDownButton.visibility = View .GONE
@@ -2504,7 +2504,6 @@ class ChatActivity :
2504
2504
unreadChatMessage.message = context.getString(R .string.nc_new_messages)
2505
2505
adapter?.addToStart(unreadChatMessage, false )
2506
2506
2507
-
2508
2507
if (scrollToEndOnUpdate) {
2509
2508
binding.scrollDownButton.visibility = View .GONE
2510
2509
newMessagesCount = 0
@@ -2519,7 +2518,6 @@ class ChatActivity :
2519
2518
}
2520
2519
}
2521
2520
2522
-
2523
2521
for (chatMessage in chatMessageList) {
2524
2522
chatMessage.activeUser = conversationUser
2525
2523
@@ -2630,7 +2628,6 @@ class ChatActivity :
2630
2628
// see getImageUrl() source code
2631
2629
setUpWaveform(currentlyPlayedVoiceMessage!! , voiceMessageToRestoreWasPlaying)
2632
2630
Log .d(RESUME_AUDIO_TAG , " resume audio procedure completed" )
2633
-
2634
2631
} else {
2635
2632
Log .d(RESUME_AUDIO_TAG , " No voice message to restore" )
2636
2633
}
@@ -2639,7 +2636,7 @@ class ChatActivity :
2639
2636
voiceMessageToRestoreWasPlaying = false
2640
2637
}
2641
2638
2642
- private fun getItemFromAdapter (messageId : String ): Pair <ChatMessage ,Int >? {
2639
+ private fun getItemFromAdapter (messageId : String ): Pair <ChatMessage , Int >? {
2643
2640
if (adapter != null ) {
2644
2641
val messagePosition = adapter!! .items!! .indexOfFirst {
2645
2642
it.item is ChatMessage && (it.item as ChatMessage ).id == messageId
@@ -2652,9 +2649,7 @@ class ChatActivity :
2652
2649
Log .d(TAG , " currentItem retrieved was not chatmessage or its id was not correct" )
2653
2650
}
2654
2651
} else {
2655
- Log .d(
2656
- TAG , " messagePosition is -1, adapter # of items: " + adapter!! .itemCount
2657
- )
2652
+ Log .d(TAG , " messagePosition is -1, adapter # of items: " + adapter!! .itemCount)
2658
2653
}
2659
2654
} else {
2660
2655
Log .d(TAG , " TalkMessagesListAdapter is null" )
@@ -2831,7 +2826,6 @@ class ChatActivity :
2831
2826
while (chatMessageIterator.hasNext()) {
2832
2827
val currentMessage = chatMessageIterator.next()
2833
2828
2834
-
2835
2829
if (isInfoMessageAboutDeletion(currentMessage) ||
2836
2830
isReactionsMessage(currentMessage) ||
2837
2831
isPollVotedMessage(currentMessage) ||
@@ -3176,7 +3170,7 @@ class ChatActivity :
3176
3170
val lon = data[" longitude" ]!!
3177
3171
metaData =
3178
3172
" {\" type\" :\" geo-location\" ,\" id\" :\" geo:$lat ,$lon \" ,\" latitude\" :\" $lat \" ," +
3179
- " \" longitude\" :\" $lon \" ,\" name\" :\" $name \" }"
3173
+ " \" longitude\" :\" $lon \" ,\" name\" :\" $name \" }"
3180
3174
}
3181
3175
3182
3176
when (type) {
0 commit comments