File tree Expand file tree Collapse file tree
app/src/main/java/com/infomaniak/mail/ui/main/thread Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,6 +169,8 @@ class ThreadFragment : Fragment() {
169169
170170 private fun setupUi () = with (binding) {
171171
172+ threadSubject.movementMethod = LinkMovementMethod .getInstance()
173+
172174 updateNavigationIcon()
173175 toolbar.setNavigationOnClickListener { twoPaneViewModel.closeThread() }
174176
@@ -350,18 +352,16 @@ class ThreadFragment : Fragment() {
350352 mainViewModel.toggleLightThemeForMessage.observe(viewLifecycleOwner, threadAdapter::toggleLightMode)
351353 }
352354
353- private fun observeThreadLive () = with (binding ) {
355+ private fun observeThreadLive () = with (threadViewModel ) {
354356
355- threadViewModel. threadLive.observe(viewLifecycleOwner) { thread ->
357+ threadLive.observe(viewLifecycleOwner) { thread ->
356358
357359 if (thread == null ) {
358360 twoPaneViewModel.closeThread()
359361 return @observe
360362 }
361363
362- threadSubject.movementMethod = LinkMovementMethod .getInstance()
363-
364- iconFavorite.apply {
364+ binding.iconFavorite.apply {
365365 setIconResource(if (thread.isFavorite) R .drawable.ic_star_filled else R .drawable.ic_star)
366366 val color = if (thread.isFavorite) {
367367 context.getColor(R .color.favoriteYellow)
You can’t perform that action at this time.
0 commit comments