feat: 优化代码

pull/182/head
kunfei 5 years ago
parent 81c2338f65
commit 314060440e
  1. 4
      app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt

@ -11,7 +11,6 @@ import io.legado.app.help.BookHelp
import io.legado.app.model.WebBook
import io.legado.app.service.help.AudioPlay
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
class AudioPlayViewModel(application: Application) : BaseViewModel(application) {
@ -93,9 +92,6 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application)
AudioPlay.book?.let {
book1.order = it.order
App.db.bookDao().delete(it)
}
withContext(Dispatchers.Main) {
}
App.db.bookDao().insert(book1)
AudioPlay.book = book1

Loading…
Cancel
Save