|
|
@ -14,7 +14,6 @@ import androidx.recyclerview.widget.RecyclerView |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.base.VMBaseFragment |
|
|
|
import io.legado.app.base.VMBaseFragment |
|
|
|
import io.legado.app.constant.AppLog |
|
|
|
import io.legado.app.constant.AppLog |
|
|
|
import io.legado.app.constant.AppPattern |
|
|
|
|
|
|
|
import io.legado.app.data.appDb |
|
|
|
import io.legado.app.data.appDb |
|
|
|
import io.legado.app.data.entities.BookSource |
|
|
|
import io.legado.app.data.entities.BookSource |
|
|
|
import io.legado.app.databinding.FragmentExploreBinding |
|
|
|
import io.legado.app.databinding.FragmentExploreBinding |
|
|
@ -23,7 +22,10 @@ import io.legado.app.lib.theme.primaryColor |
|
|
|
import io.legado.app.lib.theme.primaryTextColor |
|
|
|
import io.legado.app.lib.theme.primaryTextColor |
|
|
|
import io.legado.app.ui.book.explore.ExploreShowActivity |
|
|
|
import io.legado.app.ui.book.explore.ExploreShowActivity |
|
|
|
import io.legado.app.ui.book.source.edit.BookSourceEditActivity |
|
|
|
import io.legado.app.ui.book.source.edit.BookSourceEditActivity |
|
|
|
import io.legado.app.utils.* |
|
|
|
import io.legado.app.utils.applyTint |
|
|
|
|
|
|
|
import io.legado.app.utils.cnCompare |
|
|
|
|
|
|
|
import io.legado.app.utils.setEdgeEffectColor |
|
|
|
|
|
|
|
import io.legado.app.utils.startActivity |
|
|
|
import io.legado.app.utils.viewbindingdelegate.viewBinding |
|
|
|
import io.legado.app.utils.viewbindingdelegate.viewBinding |
|
|
|
import kotlinx.coroutines.CoroutineScope |
|
|
|
import kotlinx.coroutines.CoroutineScope |
|
|
|
import kotlinx.coroutines.Job |
|
|
|
import kotlinx.coroutines.Job |
|
|
@ -106,9 +108,7 @@ class ExploreFragment : VMBaseFragment<ExploreViewModel>(R.layout.fragment_explo |
|
|
|
launch { |
|
|
|
launch { |
|
|
|
appDb.bookSourceDao.flowExploreGroup().conflate().collect { |
|
|
|
appDb.bookSourceDao.flowExploreGroup().conflate().collect { |
|
|
|
groups.clear() |
|
|
|
groups.clear() |
|
|
|
it.map { group -> |
|
|
|
groups.addAll(it) |
|
|
|
groups.addAll(group.splitNotBlank(AppPattern.splitGroupRegex)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
upGroupsMenu() |
|
|
|
upGroupsMenu() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|