优化
This commit is contained in:
@@ -2,6 +2,7 @@ package io.legado.app.ui.book.changesource
|
|||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.annotation.CallSuper
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import io.legado.app.base.BaseViewModel
|
import io.legado.app.base.BaseViewModel
|
||||||
@@ -85,6 +86,7 @@ open class ChangeBookSourceViewModel(application: Application) : BaseViewModel(a
|
|||||||
@Volatile
|
@Volatile
|
||||||
private var searchIndex = -1
|
private var searchIndex = -1
|
||||||
|
|
||||||
|
@CallSuper
|
||||||
open fun initData(arguments: Bundle?) {
|
open fun initData(arguments: Bundle?) {
|
||||||
arguments?.let { bundle ->
|
arguments?.let { bundle ->
|
||||||
bundle.getString("name")?.let {
|
bundle.getString("name")?.let {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class ChangeChapterSourceViewModel(application: Application) :
|
|||||||
private val tocMap = ConcurrentHashMap<String, List<BookChapter>>()
|
private val tocMap = ConcurrentHashMap<String, List<BookChapter>>()
|
||||||
|
|
||||||
override fun initData(arguments: Bundle?) {
|
override fun initData(arguments: Bundle?) {
|
||||||
|
super.initData(arguments)
|
||||||
arguments?.let { bundle ->
|
arguments?.let { bundle ->
|
||||||
bundle.getString("chapterTitle")?.let {
|
bundle.getString("chapterTitle")?.let {
|
||||||
chapterTitle = it
|
chapterTitle = it
|
||||||
|
|||||||
Reference in New Issue
Block a user