forked from upstream-mirrors/quik
Reduce number of errors in gradle build
This commit is contained in:
@@ -38,6 +38,7 @@ import io.reactivex.disposables.CompositeDisposable
|
||||
import io.reactivex.rxkotlin.plusAssign
|
||||
import io.reactivex.subjects.PublishSubject
|
||||
import io.reactivex.subjects.Subject
|
||||
import io.realm.RealmList
|
||||
import io.realm.RealmRecyclerViewAdapter
|
||||
import kotlinx.android.synthetic.main.message_list_item_in.view.*
|
||||
import presentation.common.base.QkViewHolder
|
||||
@@ -47,8 +48,8 @@ import javax.inject.Inject
|
||||
class MessagesAdapter @Inject constructor(
|
||||
private val context: Context,
|
||||
private val colors: Colors,
|
||||
private val dateFormatter: DateFormatter)
|
||||
: RealmRecyclerViewAdapter<Message, QkViewHolder>(null, true) {
|
||||
private val dateFormatter: DateFormatter
|
||||
) : RealmRecyclerViewAdapter<Message, QkViewHolder>(null, true) {
|
||||
|
||||
companion object {
|
||||
private val VIEWTYPE_ME = 1
|
||||
@@ -92,9 +93,8 @@ class MessagesAdapter @Inject constructor(
|
||||
}
|
||||
|
||||
if (absViewType != VIEWTYPE_ME) {
|
||||
view.avatar.contact = Contact().apply {
|
||||
numbers.add(PhoneNumber().apply { address = people[absViewType - 2] })
|
||||
}
|
||||
val number = PhoneNumber(address = people[absViewType - 2])
|
||||
view.avatar.contact = Contact(numbers = RealmList(number))
|
||||
}
|
||||
|
||||
return QkViewHolder(view)
|
||||
|
||||
@@ -139,6 +139,7 @@ class MainViewModel : QkViewModel<MainView, MainState>(MainState()) {
|
||||
DrawerItem.ARCHIVED -> newState { it.copy(page = Archived(messageRepo.getConversations(true))) }
|
||||
DrawerItem.SCHEDULED -> newState { it.copy(page = Scheduled()) }
|
||||
DrawerItem.BLOCKED -> newState { it.copy(page = Blocked()) }
|
||||
else -> {} // Do nothing
|
||||
}
|
||||
}
|
||||
.autoDisposable(view.scope())
|
||||
@@ -151,7 +152,7 @@ class MainViewModel : QkViewModel<MainView, MainState>(MainState()) {
|
||||
.subscribe()
|
||||
|
||||
view.conversationLongClickIntent
|
||||
.withLatestFrom(state, { l, mainState ->
|
||||
.withLatestFrom(state, { _, mainState ->
|
||||
when (mainState.page) {
|
||||
is Inbox -> {
|
||||
val page = mainState.page.copy(menu = listOf(menuArchive, menuDelete))
|
||||
|
||||
Reference in New Issue
Block a user