similar updates that i made in neko
This commit is contained in:
parent
cac18f16ab
commit
07999b0c2d
2 changed files with 6 additions and 13 deletions
|
@ -7,18 +7,10 @@ import com.pushtorefresh.storio.sqlite.operations.put.PreparedPutObject
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
suspend fun <T> PreparedGetListOfObjects<T>.executeOnIO(): List<T> {
|
suspend fun <T> PreparedGetListOfObjects<T>.executeOnIO(): List<T> = withContext(Dispatchers.IO) { executeAsBlocking() }
|
||||||
return withContext(Dispatchers.IO) { executeAsBlocking() }
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun <T> PreparedGetObject<T>.executeOnIO(): T? {
|
suspend fun <T> PreparedGetObject<T>.executeOnIO(): T? = withContext(Dispatchers.IO) { executeAsBlocking() }
|
||||||
return withContext(Dispatchers.IO) { executeAsBlocking() }
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun <T> PreparedPutObject<T>.executeOnIO() {
|
suspend fun <T> PreparedPutObject<T>.executeOnIO() = withContext(Dispatchers.IO) { executeAsBlocking() }
|
||||||
withContext(Dispatchers.IO) { executeAsBlocking() }
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun <T> PreparedPutCollectionOfObjects<T>.executeOnIO() {
|
suspend fun <T> PreparedPutCollectionOfObjects<T>.executeOnIO() = withContext(Dispatchers.IO) { executeAsBlocking() }
|
||||||
withContext(Dispatchers.IO) { executeAsBlocking() }
|
|
||||||
}
|
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/reader_menu"
|
android:id="@+id/reader_menu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="gone" >
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
|
|
Reference in a new issue