Commit a34484ae authored by Romain Hunault's avatar Romain Hunault

Merge branch 'build_error_fix' into 'dev'

Build error fix

See merge request !18
parents ba785ec8 07380161
Pipeline #38486 passed with stage
in 7 minutes and 16 seconds
......@@ -24,16 +24,7 @@ import com.moez.QKSMS.common.Navigator
import com.moez.QKSMS.common.base.QkViewModel
import com.moez.QKSMS.common.util.BillingManager
import com.moez.QKSMS.extensions.mapNotNull
import com.moez.QKSMS.interactor.DeleteConversations
import com.moez.QKSMS.interactor.MarkAllSeen
import com.moez.QKSMS.interactor.MarkArchived
import com.moez.QKSMS.interactor.MarkPinned
import com.moez.QKSMS.interactor.MarkRead
import com.moez.QKSMS.interactor.MarkUnarchived
import com.moez.QKSMS.interactor.MarkUnpinned
import com.moez.QKSMS.interactor.MarkUnread
import com.moez.QKSMS.interactor.MigratePreferences
import com.moez.QKSMS.interactor.SyncMessages
import com.moez.QKSMS.interactor.*
import com.moez.QKSMS.listener.ContactAddedListener
import com.moez.QKSMS.manager.ChangelogManager
import com.moez.QKSMS.manager.PermissionManager
......@@ -58,6 +49,8 @@ class MainViewModel @Inject constructor(
markAllSeen: MarkAllSeen,
migratePreferences: MigratePreferences,
syncRepository: SyncRepository,
private val contactAddedListener: ContactAddedListener,
private val changelogManager: ChangelogManager,
private val conversationRepo: ConversationRepository,
private val deleteConversations: DeleteConversations,
private val markArchived: MarkArchived,
......@@ -391,24 +384,6 @@ class MainViewModel @Inject constructor(
.autoDisposable(view.scope())
.subscribe()
view.backPressedIntent
.withLatestFrom(state) { _, state ->
when {
state.drawerOpen -> newState { copy(drawerOpen = false) }
state.page is Searching -> view.clearSearch()
state.page is Inbox && state.page.selected > 0 -> view.clearSelection()
state.page is Archived && state.page.selected > 0 -> view.clearSelection()
state.page !is Inbox -> newState { copy(page = Inbox(data = conversationRepo.getConversations())) }
else -> newState { copy(hasError = true) }
}
}
.autoDisposable(view.scope())
.subscribe()
if (threadId == 0L) {
......
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