For #355 - Fixes coroutine scope
parent
b9171cd99a
commit
29227e6f90
|
@ -30,7 +30,7 @@ class HistoryFragment : Fragment(), CoroutineScope {
|
||||||
|
|
||||||
lateinit var job: Job
|
lateinit var job: Job
|
||||||
override val coroutineContext: CoroutineContext
|
override val coroutineContext: CoroutineContext
|
||||||
get() = Dispatchers.Main + job
|
get() = Dispatchers.Default + job
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
|
@ -76,7 +76,7 @@ class HistoryFragment : Fragment(), CoroutineScope {
|
||||||
|
|
||||||
val eventEmitter = ActionBusFactory.get(this)
|
val eventEmitter = ActionBusFactory.get(this)
|
||||||
|
|
||||||
launch {
|
launch(Dispatchers.IO) {
|
||||||
val items = requireComponents.core.historyStorage.getVisited().map { HistoryItem(it) }
|
val items = requireComponents.core.historyStorage.getVisited().map { HistoryItem(it) }
|
||||||
|
|
||||||
launch(Dispatchers.Main) {
|
launch(Dispatchers.Main) {
|
||||||
|
|
Loading…
Reference in New Issue