#1433 - Add swipe action for unread

This commit is contained in:
moezbhatti
2019-06-09 01:54:49 -04:00
parent 97f447dfd3
commit aa3791bc50
5 changed files with 5 additions and 0 deletions
@@ -122,6 +122,7 @@ class ConversationItemTouchCallback @Inject constructor(
Preferences.SWIPE_ACTION_DELETE -> R.drawable.ic_delete_white_24dp
Preferences.SWIPE_ACTION_CALL -> R.drawable.ic_call_white_24dp
Preferences.SWIPE_ACTION_READ -> R.drawable.ic_check_white_24dp
Preferences.SWIPE_ACTION_UNREAD -> R.drawable.ic_markunread_black_24dp
else -> null
}
@@ -339,6 +339,7 @@ class MainViewModel @Inject constructor(
Preferences.SWIPE_ACTION_DELETE -> view.showDeleteDialog(listOf(threadId))
Preferences.SWIPE_ACTION_CALL -> conversationRepo.getConversation(threadId)?.recipients?.firstOrNull()?.address?.let(navigator::makePhoneCall)
Preferences.SWIPE_ACTION_READ -> markRead.execute(listOf(threadId))
Preferences.SWIPE_ACTION_UNREAD -> markUnread.execute(listOf(threadId))
}
}
@@ -73,6 +73,7 @@ class SwipeActionsPresenter @Inject constructor(
Preferences.SWIPE_ACTION_DELETE -> R.drawable.ic_delete_white_24dp
Preferences.SWIPE_ACTION_CALL -> R.drawable.ic_call_white_24dp
Preferences.SWIPE_ACTION_READ -> R.drawable.ic_check_white_24dp
Preferences.SWIPE_ACTION_UNREAD -> R.drawable.ic_markunread_black_24dp
else -> 0
}