Commit 618eb217 authored by Noor Binte Amir's avatar Noor Binte Amir

Update ChatRoomsRepository.kt

Updated variable names.
parent f403fa6a
......@@ -15,10 +15,10 @@ class ChatRoomsRepository @Inject constructor(private val dao: ChatRoomDao) {
Order.GROUPED_ACTIVITY -> dao.getAllGrouped()
Order.NAME -> dao.getAllAlphabetically()
Order.GROUPED_NAME -> dao.getAllAlphabeticallyGrouped()
Order.UNREADONTOP_ACTIVITY -> dao.getAllUnread();
Order.UNREADONTOP_NAME -> dao.getAllAlphabeticallyUnread();
Order.UNREADONTOP_GROUPED_ACTIVITY -> dao.getAllGroupedUnread();
Order.UNREADONTOP_GROUPED_NAME -> dao.getAllAlphabeticallyGroupedUnread();
Order.UNREAD_ON_TOP_ACTIVITY -> dao.getAllUnread();
Order.UNREAD_ON_TOP_NAME -> dao.getAllAlphabeticallyUnread();
Order.UNREAD_ON_TOP_GROUPED_ACTIVITY -> dao.getAllGroupedUnread();
Order.UNREAD_ON_TOP_GROUPED_NAME -> dao.getAllAlphabeticallyGroupedUnread();
}
}
......@@ -32,16 +32,16 @@ class ChatRoomsRepository @Inject constructor(private val dao: ChatRoomDao) {
GROUPED_ACTIVITY,
NAME,
GROUPED_NAME,
UNREADONTOP_ACTIVITY,
UNREADONTOP_NAME,
UNREADONTOP_GROUPED_ACTIVITY,
UNREADONTOP_GROUPED_NAME
UNREAD_ON_TOP_ACTIVITY,
UNREAD_ON_TOP_NAME,
UNREAD_ON_TOP_GROUPED_ACTIVITY,
UNREAD_ON_TOP_GROUPED_NAME
}
}
fun ChatRoomsRepository.Order.isGrouped(): Boolean = this == ChatRoomsRepository.Order.GROUPED_ACTIVITY
|| this == ChatRoomsRepository.Order.GROUPED_NAME
fun ChatRoomsRepository.Order.isUnreadOnTop(): Boolean = this == ChatRoomsRepository.Order.UNREADONTOP_ACTIVITY
|| this == ChatRoomsRepository.Order.UNREADONTOP_NAME
fun ChatRoomsRepository.Order.isUnreadOnTop(): Boolean = this == ChatRoomsRepository.Order.UNREAD_ON_TOP_ACTIVITY
|| this == ChatRoomsRepository.Order.UNREAD_ON_TOP_NAME
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment