修复部分描述。

This commit is contained in:
Cold-Mint 2023-03-02 19:03:55 +08:00
parent 7ecddf8976
commit 1fa923b235
4 changed files with 24 additions and 25 deletions

View File

@ -12,6 +12,7 @@ import android.text.style.ClickableSpan
import android.util.Log import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.widget.Toast
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.DividerItemDecoration
@ -157,8 +158,7 @@ class AllUnitsFragment(
Regex(data?.sourceFileFilteringRule ?: ".+\\.ini|.+\\.template") Regex(data?.sourceFileFilteringRule ?: ".+\\.ini|.+\\.template")
fileFinder2.setFinderListener(object : FileFinderListener { fileFinder2.setFinderListener(object : FileFinderListener {
override fun whenFindFile(file: File): Boolean { override fun whenFindFile(file: File): Boolean {
if (fileDatabase == null || modClass == null) if (fileDatabase == null || modClass == null) {
{
return false return false
} }
//此处在这里判断的目的是将所有文件录入数据库 //此处在这里判断的目的是将所有文件录入数据库
@ -168,7 +168,8 @@ class AllUnitsFragment(
dataList.add(sourceFileClass) dataList.add(sourceFileClass)
} }
val fileTable = FileDataBase.createFileInfoFromFile(file) val fileTable = FileDataBase.createFileInfoFromFile(file)
if (fileDatabase!!.getFileInfoDao().findFileInfoByPath(file.absolutePath) == null if (fileDatabase!!.getFileInfoDao()
.findFileInfoByPath(file.absolutePath) == null
) { ) {
fileDatabase!!.getFileInfoDao().insert(fileTable) fileDatabase!!.getFileInfoDao().insert(fileTable)
} else { } else {
@ -190,7 +191,6 @@ class AllUnitsFragment(
viewBinding.swipeRefreshLayout.isVisible = true viewBinding.swipeRefreshLayout.isVisible = true
viewBinding.progressBar.isVisible = false viewBinding.progressBar.isVisible = false
viewBinding.unitError.isVisible = false viewBinding.unitError.isVisible = false
if (isAdded) {
val adapter = UnitAdapter(requireContext(), dataList, "") val adapter = UnitAdapter(requireContext(), dataList, "")
adapter.setItemEvent { i, unitItemBinding, viewHolder, sourceFileClass -> adapter.setItemEvent { i, unitItemBinding, viewHolder, sourceFileClass ->
unitItemBinding.root.setOnClickListener { unitItemBinding.root.setOnClickListener {
@ -211,7 +211,6 @@ class AllUnitsFragment(
} }
} }
} }
}
/** /**

View File

@ -247,10 +247,10 @@ class ModFragment : BaseFragment<FragmentModBinding>() {
configurationManager?.readData() configurationManager?.readData()
val works: MutableList<String> = ArrayList() val works: MutableList<String> = ArrayList()
if (modClass.modFile.isDirectory) { if (modClass.modFile.isDirectory) {
val developerMode = AppSettings.getValue(AppSettings.Setting.DeveloperMode, false) // val developerMode = AppSettings.getValue(AppSettings.Setting.DeveloperMode, false)
if (developerMode) { // if (developerMode) {
works.add(getString(R.string.generate_error_report)) // works.add(getString(R.string.generate_error_report))
} // }
if (GlobalMethod.isActive) { if (GlobalMethod.isActive) {
works.add(getString(R.string.mod_action1)) works.add(getString(R.string.mod_action1))
if (modClass.hasInfo()) { if (modClass.hasInfo()) {

View File

@ -703,7 +703,7 @@
<string name="renewal">续费</string> <string name="renewal">续费</string>
<string name="renewal_tip_title">续费提醒</string> <string name="renewal_tip_title">续费提醒</string>
<string name="renewal_tip_msg">您的账号(%1$s)将于%2$d天后到期。</string> <string name="renewal_tip_msg">您的账号(%1$s)将于%2$d天后到期。</string>
<string name="forever_time">永久激活</string> <string name="forever_time">赞助者</string>
<string name="can_t_activate">您已永久激活。</string> <string name="can_t_activate">您已永久激活。</string>
<string name="report">举报</string> <string name="report">举报</string>
<string name="report_t">举报-%1$s</string> <string name="report_t">举报-%1$s</string>

View File

@ -1,4 +1,4 @@
include ':app' include ':app'
rootProject.name = "铁锈助手" rootProject.name = "RustedAssistant"
include ':assistantCoreLibrary' include ':assistantCoreLibrary'
include ':dialog' include ':dialog'