mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Move delegate creation to a lazy field.
This commit is contained in:
committed by
Nicholas Tinsley
parent
62b4ebc4a9
commit
133effccfc
@@ -522,7 +522,14 @@ class ConversationFragment :
|
||||
|
||||
private val scheduledMessagesStub: Stub<View> by lazy { Stub(binding.scheduledMessagesStub) }
|
||||
|
||||
private lateinit var reactionDelegate: ConversationReactionDelegate
|
||||
private val reactionDelegate: ConversationReactionDelegate by lazy(LazyThreadSafetyMode.NONE) {
|
||||
val conversationReactionStub = Stub<ConversationReactionOverlay>(binding.conversationReactionScrubberStub)
|
||||
val delegate = ConversationReactionDelegate(conversationReactionStub)
|
||||
delegate.setOnReactionSelectedListener(OnReactionsSelectedListener())
|
||||
|
||||
delegate
|
||||
}
|
||||
|
||||
private lateinit var voiceMessageRecordingDelegate: VoiceMessageRecordingDelegate
|
||||
|
||||
//region Android Lifecycle
|
||||
@@ -952,10 +959,6 @@ class ConversationFragment :
|
||||
)
|
||||
|
||||
childFragmentManager.setFragmentResultListener(AttachmentKeyboardFragment.RESULT_KEY, viewLifecycleOwner, AttachmentKeyboardFragmentListener())
|
||||
|
||||
val conversationReactionStub = Stub<ConversationReactionOverlay>(binding.conversationReactionScrubberStub)
|
||||
reactionDelegate = ConversationReactionDelegate(conversationReactionStub)
|
||||
reactionDelegate.setOnReactionSelectedListener(OnReactionsSelectedListener())
|
||||
motionEventRelay.setDrain(MotionEventRelayDrain(this))
|
||||
|
||||
voiceMessageRecordingDelegate = VoiceMessageRecordingDelegate(
|
||||
|
||||
Reference in New Issue
Block a user