Skip to content

Commit 115daa0

Browse files
Swap with(binding) { … } with with(threadViewModel) { … }
1 parent b1da033 commit 115daa0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadFragment.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,18 +350,18 @@ class ThreadFragment : Fragment() {
350350
mainViewModel.toggleLightThemeForMessage.observe(viewLifecycleOwner, threadAdapter::toggleLightMode)
351351
}
352352

353-
private fun observeThreadLive() = with(binding) {
353+
private fun observeThreadLive() = with(threadViewModel) {
354354

355-
threadViewModel.threadLive.observe(viewLifecycleOwner) { thread ->
355+
threadLive.observe(viewLifecycleOwner) { thread ->
356356

357357
if (thread == null) {
358358
twoPaneViewModel.closeThread()
359359
return@observe
360360
}
361361

362-
threadSubject.movementMethod = LinkMovementMethod.getInstance()
362+
binding.threadSubject.movementMethod = LinkMovementMethod.getInstance()
363363

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)

0 commit comments

Comments
 (0)