|
@@ -10,9 +10,6 @@ import io.legado.app.constant.PageAnim
|
|
|
import io.legado.app.data.entities.HighlightRule
|
|
import io.legado.app.data.entities.HighlightRule
|
|
|
import io.legado.app.data.repository.ReadStyleRepository
|
|
import io.legado.app.data.repository.ReadStyleRepository
|
|
|
import io.legado.app.domain.gateway.ReadSettingsGateway
|
|
import io.legado.app.domain.gateway.ReadSettingsGateway
|
|
|
-import io.legado.app.domain.gateway.ReadStyleGateway
|
|
|
|
|
-import io.legado.app.domain.gateway.ReadStyleMutation
|
|
|
|
|
-import io.legado.app.domain.gateway.ReadStyleStringKey
|
|
|
|
|
import io.legado.app.help.DefaultData
|
|
import io.legado.app.help.DefaultData
|
|
|
import io.legado.app.help.coroutine.Coroutine
|
|
import io.legado.app.help.coroutine.Coroutine
|
|
|
import io.legado.app.model.ReadSessionState
|
|
import io.legado.app.model.ReadSessionState
|
|
@@ -30,7 +27,6 @@ import java.io.InputStream
|
|
|
@Keep
|
|
@Keep
|
|
|
object ReadBookConfig {
|
|
object ReadBookConfig {
|
|
|
private lateinit var readStyleRepository: ReadStyleRepository
|
|
private lateinit var readStyleRepository: ReadStyleRepository
|
|
|
- private lateinit var readStyleGateway: ReadStyleGateway
|
|
|
|
|
private lateinit var readSettingsGateway: ReadSettingsGateway
|
|
private lateinit var readSettingsGateway: ReadSettingsGateway
|
|
|
private val readSettings get() = readSettingsGateway.currentSettings
|
|
private val readSettings get() = readSettingsGateway.currentSettings
|
|
|
|
|
|
|
@@ -44,10 +40,6 @@ object ReadBookConfig {
|
|
|
initShareConfig()
|
|
initShareConfig()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- internal fun attachGateway(readStyleGateway: ReadStyleGateway) {
|
|
|
|
|
- this.readStyleGateway = readStyleGateway
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// region Tip position constants
|
|
// region Tip position constants
|
|
|
const val tipNone = 0
|
|
const val tipNone = 0
|
|
|
const val tipChapterTitle = 1
|
|
const val tipChapterTitle = 1
|
|
@@ -148,13 +140,6 @@ object ReadBookConfig {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- fun clearMissingTextFont() {
|
|
|
|
|
- readStyleGateway.updateCurrentStyle(
|
|
|
|
|
- ReadStyleMutation.StringValue(ReadStyleStringKey.TextFont, "")
|
|
|
|
|
- )
|
|
|
|
|
- readStyleGateway.save()
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
fun getAllPicBgStr(): ArrayList<String> {
|
|
fun getAllPicBgStr(): ArrayList<String> {
|
|
|
return readStyleRepository.getAllPicBgStr(configList)
|
|
return readStyleRepository.getAllPicBgStr(configList)
|
|
|
}
|
|
}
|