|
|
@ -252,7 +252,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|
|
|
viewModelFactory.create(threadId, MessagingModuleConfiguration.shared.getUserED25519KeyPair())
|
|
|
|
viewModelFactory.create(threadId, MessagingModuleConfiguration.shared.getUserED25519KeyPair())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private var actionMode: ActionMode? = null
|
|
|
|
private var actionMode: ActionMode? = null
|
|
|
|
private var unreadCount = 0
|
|
|
|
private var unreadCount = Int.MAX_VALUE
|
|
|
|
// Attachments
|
|
|
|
// Attachments
|
|
|
|
private val audioRecorder = AudioRecorder(this)
|
|
|
|
private val audioRecorder = AudioRecorder(this)
|
|
|
|
private val stopAudioHandler = Handler(Looper.getMainLooper())
|
|
|
|
private val stopAudioHandler = Handler(Looper.getMainLooper())
|
|
|
@ -575,7 +575,8 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|
|
|
binding!!.conversationRecyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
|
|
|
binding!!.conversationRecyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
|
|
|
|
|
|
|
|
|
|
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
|
|
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
|
|
|
if (recyclerScrollState == RecyclerView.SCROLL_STATE_IDLE) {
|
|
|
|
// The unreadCount check is to prevent us scrolling to the bottom when we first enter a conversation
|
|
|
|
|
|
|
|
if (recyclerScrollState == RecyclerView.SCROLL_STATE_IDLE && unreadCount != Int.MAX_VALUE) {
|
|
|
|
scrollToMostRecentMessageIfWeShould()
|
|
|
|
scrollToMostRecentMessageIfWeShould()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
handleRecyclerViewScrolled()
|
|
|
|
handleRecyclerViewScrolled()
|
|
|
|