Fix cell re-use issue

This commit is contained in:
Niels Andriesse 2021-06-21 14:00:48 +10:00
parent f79bb5e0d4
commit 517539a837
2 changed files with 4 additions and 13 deletions

View File

@ -64,7 +64,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
handleLongPress(message, position) handleLongPress(message, position)
} }
) )
adapter.setHasStableIds(true)
adapter adapter
} }

View File

@ -13,19 +13,11 @@ import org.thoughtcrime.securesms.database.model.MessageRecord
class ControlMessageView : LinearLayout { class ControlMessageView : LinearLayout {
// region Lifecycle // region Lifecycle
constructor(context: Context) : super(context) { constructor(context: Context) : super(context) { initialize() }
setUpViewHierarchy() constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { initialize() }
} constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { initialize() }
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { private fun initialize() {
setUpViewHierarchy()
}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
setUpViewHierarchy()
}
private fun setUpViewHierarchy() {
LayoutInflater.from(context).inflate(R.layout.view_control_message, this) LayoutInflater.from(context).inflate(R.layout.view_control_message, this)
} }
// endregion // endregion