mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
9f8ed4daf2
* refactor: add a block action and change default message request behavior to decline/delete * refactor: move log calls, add block & delete menu option * refactor: migrate some more actions into ConversationActivityV2.kt and only show message request incoming menu if it's an incoming message request * refactor: change block behaviour to be in the message request actions * refactor: use block user copy * refactor: parameters for ConversationMenuHelper interface cleaned up
20 lines
692 B
Kotlin
20 lines
692 B
Kotlin
package org.thoughtcrime.securesms
|
|
|
|
import nl.komponents.kovenant.Kovenant
|
|
import nl.komponents.kovenant.jvm.asDispatcher
|
|
import org.session.libsignal.utilities.Log
|
|
import org.session.libsignal.utilities.ThreadUtils
|
|
import java.util.concurrent.Executors
|
|
|
|
object AppContext {
|
|
|
|
fun configureKovenant() {
|
|
Kovenant.context {
|
|
callbackContext.dispatcher = Executors.newSingleThreadExecutor().asDispatcher()
|
|
workerContext.dispatcher = ThreadUtils.executorPool.asDispatcher()
|
|
multipleCompletion = { v1, v2 ->
|
|
Log.d("Loki", "Promise resolved more than once (first with $v1, then with $v2); ignoring $v2.")
|
|
}
|
|
}
|
|
}
|
|
} |