File tree 1 file changed +5
-5
lines changed
app/src/main/java/com/infomaniak/mail/ui/main/thread
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,8 @@ class ThreadFragment : Fragment() {
169
169
170
170
private fun setupUi () = with (binding) {
171
171
172
+ threadSubject.movementMethod = LinkMovementMethod .getInstance()
173
+
172
174
updateNavigationIcon()
173
175
toolbar.setNavigationOnClickListener { twoPaneViewModel.closeThread() }
174
176
@@ -350,18 +352,16 @@ class ThreadFragment : Fragment() {
350
352
mainViewModel.toggleLightThemeForMessage.observe(viewLifecycleOwner, threadAdapter::toggleLightMode)
351
353
}
352
354
353
- private fun observeThreadLive () = with (binding ) {
355
+ private fun observeThreadLive () = with (threadViewModel ) {
354
356
355
- threadViewModel. threadLive.observe(viewLifecycleOwner) { thread ->
357
+ threadLive.observe(viewLifecycleOwner) { thread ->
356
358
357
359
if (thread == null ) {
358
360
twoPaneViewModel.closeThread()
359
361
return @observe
360
362
}
361
363
362
- threadSubject.movementMethod = LinkMovementMethod .getInstance()
363
-
364
- iconFavorite.apply {
364
+ binding.iconFavorite.apply {
365
365
setIconResource(if (thread.isFavorite) R .drawable.ic_star_filled else R .drawable.ic_star)
366
366
val color = if (thread.isFavorite) {
367
367
context.getColor(R .color.favoriteYellow)
You can’t perform that action at this time.
0 commit comments