forked from upstream-mirrors/quik
#1433 - Add swipe action for unread
This commit is contained in:
@@ -58,6 +58,7 @@ class Preferences @Inject constructor(private val rxPrefs: RxSharedPreferences)
|
||||
const val SWIPE_ACTION_DELETE = 2
|
||||
const val SWIPE_ACTION_CALL = 3
|
||||
const val SWIPE_ACTION_READ = 4
|
||||
const val SWIPE_ACTION_UNREAD = 5
|
||||
}
|
||||
|
||||
// Internal
|
||||
|
||||
+1
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -237,6 +237,7 @@
|
||||
<item>Delete</item>
|
||||
<item>Call</item>
|
||||
<item>Mark read</item>
|
||||
<item>Mark unread</item>
|
||||
</string-array>
|
||||
<string name="settings_delivery_title">Delivery confirmations</string>
|
||||
<string name="settings_delivery_summary">Confirm that messages were sent successfully</string>
|
||||
|
||||
Reference in New Issue
Block a user