pull/1395/head
gedoor 3 years ago
parent 5fe41ddbc4
commit 4c26190740
  1. 5
      app/src/main/assets/updateLog.md
  2. 1
      app/src/main/java/io/legado/app/constant/PreferKey.kt
  3. 6
      app/src/main/java/io/legado/app/help/AppConfig.kt
  4. 2
      app/src/main/java/io/legado/app/lib/dialogs/AndroidDialogs.kt
  5. 4
      app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt
  6. 4
      app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt
  7. 4
      app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt
  8. 4
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  9. 2
      app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt
  10. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  11. 4
      app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt
  12. 16
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt
  13. 2
      app/src/main/java/io/legado/app/ui/book/read/config/ChineseConverter.kt
  14. 2
      app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt
  15. 2
      app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt
  16. 4
      app/src/main/java/io/legado/app/ui/book/read/config/TocRegexDialog.kt
  17. 2
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt
  18. 12
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  19. 2
      app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt
  20. 6
      app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt
  21. 2
      app/src/main/java/io/legado/app/ui/rss/article/RssSortActivity.kt
  22. 2
      app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt
  23. 6
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt
  24. 2
      app/src/main/java/io/legado/app/ui/rss/subscription/RuleSubActivity.kt
  25. 2
      app/src/main/res/values-es-rES/strings.xml
  26. 2
      app/src/main/res/values-ja-rJP/strings.xml
  27. 2
      app/src/main/res/values-pt-rBR/strings.xml
  28. 2
      app/src/main/res/values-zh-rHK/strings.xml
  29. 2
      app/src/main/res/values-zh-rTW/strings.xml
  30. 2
      app/src/main/res/values-zh/strings.xml
  31. 2
      app/src/main/res/values/strings.xml

@ -11,11 +11,12 @@
* 正文出现缺字漏字、内容缺失、排版错乱等情况,有可能是净化规则或简繁转换出现问题。
* 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源!
**2021/09/30**
**2021/10/01**
1. 默认封面名称显示全
2. 发现js错误时可以查看详情
3. 其它一些优化
4. 修复rss标题显示url的问题
5. 长按正文网址可以选择是否外部浏览器打开,会记住选择
**2021/09/29**

@ -89,6 +89,7 @@ object PreferKey {
const val nightBrightness = "nightBrightness"
const val expandTextMenu = "expandTextMenu"
const val doublePageHorizontal = "doublePageHorizontal"
const val readUrlOpenInBrowser = "readUrlInBrowser"
const val cPrimary = "colorPrimary"
const val cAccent = "colorAccent"

@ -182,6 +182,12 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
appCtx.putPrefInt(PreferKey.barElevation, value)
}
var readUrlInBrowser: Boolean
get() = appCtx.getPrefBoolean(PreferKey.readUrlOpenInBrowser)
set(value) {
appCtx.putPrefBoolean(PreferKey.readUrlOpenInBrowser, value)
}
var exportCharset: String
get() {
val c = appCtx.getPrefString(PreferKey.exportCharset)

@ -49,6 +49,8 @@ fun Context.alert(
this.setMessage(messageResource)
}
if (init != null) init()
}.apply {
show()
}
}

@ -66,7 +66,7 @@ class ReadRecordActivity : BaseActivity<ActivityReadRecordBinding>() {
initData()
}
noButton()
}.show()
}
}
}
@ -143,7 +143,7 @@ class ReadRecordActivity : BaseActivity<ActivityReadRecordBinding>() {
initData()
}
noButton()
}.show()
}
}
}

@ -160,7 +160,7 @@ class ArrangeBookActivity : VMBaseActivity<ActivityArrangeBookBinding, ArrangeBo
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.deleteBook(*adapter.selectedBooks()) }
noButton()
}.show()
}
R.id.menu_update_enable ->
viewModel.upCanUpdate(adapter.selectedBooks(), true)
R.id.menu_update_disable ->
@ -222,7 +222,7 @@ class ArrangeBookActivity : VMBaseActivity<ActivityArrangeBookBinding, ArrangeBo
okButton {
viewModel.deleteBook(book)
}
}.show()
}
}
}

@ -301,7 +301,7 @@ class CacheActivity : VMBaseActivity<ActivityCacheBookBinding, CacheViewModel>()
AppConfig.bookExportFileName = alertBinding.editView.text?.toString()
}
cancelButton()
}.show()
}
}
private fun getTypeName(): String {
@ -328,7 +328,7 @@ class CacheActivity : VMBaseActivity<ActivityCacheBookBinding, CacheViewModel>()
AppConfig.exportCharset = alertBinding.editView.text?.toString() ?: "UTF-8"
}
cancelButton()
}.show()
}
}
override fun exportProgress(bookUrl: String): Int? {

@ -333,7 +333,7 @@ class BookInfoActivity :
neutralButton(R.string.delete) {
viewModel.bookSource?.setVariable(null)
}
}.show()
}
}
}
@ -358,7 +358,7 @@ class BookInfoActivity :
?.putVariable("custom", null)
viewModel.saveBook()
}
}.show()
}
}
}

@ -290,7 +290,7 @@ class ImportBookActivity : VMBaseActivity<ActivityImportBookBinding, ImportBookV
AppConfig.bookImportFileName = alertBinding.editView.text?.toString()
}
cancelButton()
}.show()
}
}
private val find: (docItem: DocItem) -> Unit = {

@ -858,7 +858,7 @@ class ReadBookActivity : ReadBookBaseActivity(),
BookRead.setProgress(progress)
}
noButton()
}.show()
}
}
private fun skipToSearch(index: Int, indexWithinChapter: Int) {

@ -202,7 +202,7 @@ abstract class ReadBookBaseActivity :
}
}
noButton()
}.show()
}
}
}
@ -220,7 +220,7 @@ abstract class ReadBookBaseActivity :
}
}
cancelButton()
}.show()
}
}
fun showPageAnimConfig(success: () -> Unit) {

@ -15,6 +15,7 @@ import io.legado.app.R
import io.legado.app.constant.PreferKey
import io.legado.app.databinding.ViewReadMenuBinding
import io.legado.app.help.*
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.*
import io.legado.app.model.BookRead
import io.legado.app.ui.web.WebViewActivity
@ -141,6 +142,9 @@ class ReadMenu @JvmOverloads constructor(
callBack.openSourceEditActivity()
}
tvChapterUrl.setOnClickListener {
if (AppConfig.readUrlInBrowser) {
context.openUrl(tvChapterUrl.text.toString().substringBefore(",{"))
} else {
context.startActivity<WebViewActivity> {
val url = tvChapterUrl.text.toString()
putExtra("title", tvChapterName.text)
@ -148,6 +152,18 @@ class ReadMenu @JvmOverloads constructor(
IntentData.put(url, BookRead.bookSource?.getHeaderMap(true))
}
}
}
tvChapterUrl.onLongClick {
context.alert(R.string.Open_fan) {
setMessage(R.string.use_browser_open)
okButton {
AppConfig.readUrlInBrowser = true
}
noButton {
AppConfig.readUrlInBrowser = false
}
}
}
//登录
tvLogin.setOnClickListener {
callBack.showLogin()

@ -44,7 +44,7 @@ class ChineseConverter(context: Context, attrs: AttributeSet?) : StrokeTextView(
upUi(i)
onChanged?.invoke()
}
}.show()
}
}
fun onChanged(unit: () -> Unit) {

@ -207,7 +207,7 @@ class SpeakEngineDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener
)
showDialogFragment(TextDialog(helpStr, TextDialog.Mode.MD))
}
}.show()
}
}
inner class Adapter(context: Context) :

@ -46,7 +46,7 @@ class TextFontWeightConverter(context: Context, attrs: AttributeSet?) :
upUi(i)
onChanged?.invoke()
}
}.show()
}
}
fun onChanged(unit: () -> Unit) {

@ -164,7 +164,7 @@ class TocRegexDialog() : BaseDialogFragment(), Toolbar.OnMenuItemClickListener {
}
}
cancelButton()
}.show()
}
}
@SuppressLint("InflateParams")
@ -185,7 +185,7 @@ class TocRegexDialog() : BaseDialogFragment(), Toolbar.OnMenuItemClickListener {
}
}
cancelButton()
}.show()
}
}
inner class TocRegexAdapter(context: Context) :

@ -160,7 +160,7 @@ class BookSourceEditActivity :
negativeButton(R.string.no) {
super.finish()
}
}.show()
}
} else {
super.finish()
}

@ -90,7 +90,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
okButton {
sendToClip(uri.toString())
}
}.show()
}
}
override fun onActivityCreated(savedInstanceState: Bundle?) {
@ -312,7 +312,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.delSelection(adapter.selection) }
noButton()
}.show()
}
}
private fun initSelectActionBar() {
@ -363,7 +363,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
checkMessageRefreshJob().start()
}
noButton()
}.show()
}
}
@SuppressLint("InflateParams")
@ -383,7 +383,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
}
}
cancelButton()
}.show()
}
}
@SuppressLint("InflateParams")
@ -403,7 +403,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
}
}
cancelButton()
}.show()
}
}
private fun upGroupMenu() = groupMenu?.let { menu ->
@ -443,7 +443,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
}
}
cancelButton()
}.show()
}
}
override fun observeLiveBus() {

@ -173,7 +173,7 @@ class OtherConfigFragment : BasePreferenceFragment(),
toastOnUi(R.string.clear_cache_success)
}
noButton()
}.show()
}
}
private fun isProcessTextEnabled(): Boolean {

@ -98,7 +98,7 @@ class ReplaceRuleActivity : VMBaseActivity<ActivityReplaceRuleBinding, ReplaceRu
okButton {
sendToClip(uri.toString())
}
}.show()
}
}
override fun onActivityCreated(savedInstanceState: Bundle?) {
@ -172,7 +172,7 @@ class ReplaceRuleActivity : VMBaseActivity<ActivityReplaceRuleBinding, ReplaceRu
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.delSelection(adapter.selection) }
noButton()
}.show()
}
}
private fun observeReplaceRuleData(searchKey: String? = null) {
@ -287,7 +287,7 @@ class ReplaceRuleActivity : VMBaseActivity<ActivityReplaceRuleBinding, ReplaceRu
}
}
cancelButton()
}.show()
}
}
private fun showHelp() {

@ -118,7 +118,7 @@ class RssSortActivity : VMBaseActivity<ActivityRssArtivlesBinding, RssSortViewMo
neutralButton(R.string.delete) {
viewModel.rssSource?.setVariable(null)
}
}.show()
}
}
}

@ -70,7 +70,7 @@ class RssSourceEditActivity :
negativeButton(R.string.no) {
super.finish()
}
}.show()
}
} else {
super.finish()
}

@ -84,7 +84,7 @@ class RssSourceActivity : VMBaseActivity<ActivityRssSourceBinding, RssSourceView
okButton {
sendToClip(uri.toString())
}
}.show()
}
}
override fun onActivityCreated(savedInstanceState: Bundle?) {
@ -221,7 +221,7 @@ class RssSourceActivity : VMBaseActivity<ActivityRssSourceBinding, RssSourceView
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.delSelection(adapter.selection) }
noButton()
}.show()
}
}
private fun upGroupMenu() = groupMenu?.let { menu ->
@ -295,7 +295,7 @@ class RssSourceActivity : VMBaseActivity<ActivityRssSourceBinding, RssSourceView
}
}
cancelButton()
}.show()
}
}
override fun del(source: RssSource) {

@ -109,7 +109,7 @@ class RuleSubActivity : BaseActivity<ActivityRuleSubBinding>(),
}
}
cancelButton()
}.show()
}
}
override fun delSubscription(ruleSub: RuleSub) {

@ -893,5 +893,7 @@
<string name="double_page_horizontal">横屏双页</string>
<string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string>
<string name="Open_fan">打开方式</string>
<string name="use_browser_open">是否使用外部浏览器打开?</string>
</resources>

@ -897,5 +897,7 @@
<string name="double_page_horizontal">横屏双页</string>
<string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string>
<string name="Open_fan">打开方式</string>
<string name="use_browser_open">是否使用外部浏览器打开?</string>
</resources>

@ -897,5 +897,7 @@
<string name="double_page_horizontal">横屏双页</string>
<string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string>
<string name="Open_fan">打开方式</string>
<string name="use_browser_open">是否使用外部浏览器打开?</string>
</resources>

@ -894,5 +894,7 @@
<string name="double_page_horizontal">横屏双页</string>
<string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string>
<string name="Open_fan">打开方式</string>
<string name="use_browser_open">是否使用外部浏览器打开?</string>
</resources>

@ -896,5 +896,7 @@
<string name="double_page_horizontal">横屏双页</string>
<string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string>
<string name="Open_fan">打开方式</string>
<string name="use_browser_open">是否使用外部浏览器打开?</string>
</resources>

@ -896,5 +896,7 @@
<string name="double_page_horizontal">横屏双页</string>
<string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string>
<string name="Open_fan">打开方式</string>
<string name="use_browser_open">是否使用外部浏览器打开?</string>
</resources>

@ -897,5 +897,7 @@
<string name="double_page_horizontal">横屏双页</string>
<string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string>
<string name="Open_fan">打开方式</string>
<string name="use_browser_open">是否使用外部浏览器打开?</string>
</resources>

Loading…
Cancel
Save