diff --git a/data/src/main/java/com/moez/QKSMS/util/Preferences.kt b/data/src/main/java/com/moez/QKSMS/util/Preferences.kt
index eb6c4cdc..f2ba12f0 100644
--- a/data/src/main/java/com/moez/QKSMS/util/Preferences.kt
+++ b/data/src/main/java/com/moez/QKSMS/util/Preferences.kt
@@ -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
diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/conversations/ConversationItemTouchCallback.kt b/presentation/src/main/java/com/moez/QKSMS/feature/conversations/ConversationItemTouchCallback.kt
index bb46fa90..5979ec96 100644
--- a/presentation/src/main/java/com/moez/QKSMS/feature/conversations/ConversationItemTouchCallback.kt
+++ b/presentation/src/main/java/com/moez/QKSMS/feature/conversations/ConversationItemTouchCallback.kt
@@ -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
}
diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt
index f576a35a..255930f4 100644
--- a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt
+++ b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt
@@ -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))
}
}
diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/settings/swipe/SwipeActionsPresenter.kt b/presentation/src/main/java/com/moez/QKSMS/feature/settings/swipe/SwipeActionsPresenter.kt
index dbc01d2e..1883e097 100644
--- a/presentation/src/main/java/com/moez/QKSMS/feature/settings/swipe/SwipeActionsPresenter.kt
+++ b/presentation/src/main/java/com/moez/QKSMS/feature/settings/swipe/SwipeActionsPresenter.kt
@@ -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
}
diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml
index b98631fe..1562885a 100644
--- a/presentation/src/main/res/values/strings.xml
+++ b/presentation/src/main/res/values/strings.xml
@@ -237,6 +237,7 @@
- Delete
- Call
- Mark read
+ - Mark unread
Delivery confirmations
Confirm that messages were sent successfully