From 98176b9760b1fe7d6fb94996421b945966cdd1bb Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 25 Jun 2019 15:45:44 +0200 Subject: [PATCH] Cleaning (code review) --- .../room/detail/timeline/action/QuickReactionFragment.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/action/QuickReactionFragment.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/action/QuickReactionFragment.kt index 7e7196a6bb..e7c0813e60 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/action/QuickReactionFragment.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/action/QuickReactionFragment.kt @@ -20,6 +20,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.widget.TextView import butterknife.ButterKnife import com.airbnb.mvrx.BaseMvRxFragment import com.airbnb.mvrx.MvRx @@ -47,14 +48,14 @@ class QuickReactionFragment : BaseMvRxFragment() { return view } - private val textViews by lazy { - listOf(quickReaction0, quickReaction1, quickReaction2, quickReaction3, - quickReaction4, quickReaction5, quickReaction6, quickReaction7) - } + lateinit var textViews: List override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + textViews = listOf(quickReaction0, quickReaction1, quickReaction2, quickReaction3, + quickReaction4, quickReaction5, quickReaction6, quickReaction7) + textViews.forEachIndexed { index, textView -> textView.typeface = fontProvider.typeface ?: Typeface.DEFAULT textView.setOnClickListener {