mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Remove view pools
This commit is contained in:
parent
072accb1e1
commit
d0e4148040
@ -145,7 +145,6 @@ import org.thoughtcrime.securesms.database.model.MessageId
|
|||||||
import org.thoughtcrime.securesms.database.model.MessageRecord
|
import org.thoughtcrime.securesms.database.model.MessageRecord
|
||||||
import org.thoughtcrime.securesms.database.model.MmsMessageRecord
|
import org.thoughtcrime.securesms.database.model.MmsMessageRecord
|
||||||
import org.thoughtcrime.securesms.database.model.ReactionRecord
|
import org.thoughtcrime.securesms.database.model.ReactionRecord
|
||||||
import org.thoughtcrime.securesms.dependencies.ConversationViewPool
|
|
||||||
import org.thoughtcrime.securesms.giph.ui.GiphyActivity
|
import org.thoughtcrime.securesms.giph.ui.GiphyActivity
|
||||||
import org.thoughtcrime.securesms.groups.OpenGroupManager
|
import org.thoughtcrime.securesms.groups.OpenGroupManager
|
||||||
import org.thoughtcrime.securesms.linkpreview.LinkPreviewRepository
|
import org.thoughtcrime.securesms.linkpreview.LinkPreviewRepository
|
||||||
@ -216,7 +215,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
@Inject lateinit var storage: Storage
|
@Inject lateinit var storage: Storage
|
||||||
@Inject lateinit var reactionDb: ReactionDatabase
|
@Inject lateinit var reactionDb: ReactionDatabase
|
||||||
@Inject lateinit var viewModelFactory: ConversationViewModel.AssistedFactory
|
@Inject lateinit var viewModelFactory: ConversationViewModel.AssistedFactory
|
||||||
@Inject @ConversationViewPool lateinit var viewPool: RecyclerView.RecycledViewPool
|
|
||||||
|
|
||||||
private val screenshotObserver by lazy {
|
private val screenshotObserver by lazy {
|
||||||
ScreenshotObserver(this, Handler(Looper.getMainLooper())) {
|
ScreenshotObserver(this, Handler(Looper.getMainLooper())) {
|
||||||
@ -569,7 +567,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
// called from onCreate
|
// called from onCreate
|
||||||
private fun setUpRecyclerView() {
|
private fun setUpRecyclerView() {
|
||||||
binding!!.conversationRecyclerView.adapter = adapter
|
binding!!.conversationRecyclerView.adapter = adapter
|
||||||
binding!!.conversationRecyclerView.setRecycledViewPool(viewPool)
|
|
||||||
val layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, reverseMessageList)
|
val layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, reverseMessageList)
|
||||||
binding!!.conversationRecyclerView.layoutManager = layoutManager
|
binding!!.conversationRecyclerView.layoutManager = layoutManager
|
||||||
// Workaround for the fact that CursorRecyclerViewAdapter doesn't auto-update automatically (even though it says it will)
|
// Workaround for the fact that CursorRecyclerViewAdapter doesn't auto-update automatically (even though it says it will)
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
package org.thoughtcrime.securesms.dependencies
|
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
|
||||||
import dagger.Module
|
|
||||||
import dagger.Provides
|
|
||||||
import dagger.hilt.InstallIn
|
|
||||||
import dagger.hilt.components.SingletonComponent
|
|
||||||
import javax.inject.Singleton
|
|
||||||
|
|
||||||
@Module
|
|
||||||
@InstallIn(SingletonComponent::class)
|
|
||||||
class UiModule {
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
|
||||||
@ConversationViewPool
|
|
||||||
fun provideConversationRecycledViewPool(): RecyclerView.RecycledViewPool {
|
|
||||||
return RecyclerView.RecycledViewPool()
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
package org.thoughtcrime.securesms.dependencies
|
|
||||||
|
|
||||||
import javax.inject.Qualifier
|
|
||||||
|
|
||||||
@Qualifier
|
|
||||||
@Retention(AnnotationRetention.SOURCE)
|
|
||||||
annotation class ConversationViewPool
|
|
Loading…
Reference in New Issue
Block a user