修复部分描述。
This commit is contained in:
parent
7ecddf8976
commit
1fa923b235
|
@ -12,6 +12,7 @@ import android.text.style.ClickableSpan
|
|||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
|
@ -157,8 +158,7 @@ class AllUnitsFragment(
|
|||
Regex(data?.sourceFileFilteringRule ?: ".+\\.ini|.+\\.template")
|
||||
fileFinder2.setFinderListener(object : FileFinderListener {
|
||||
override fun whenFindFile(file: File): Boolean {
|
||||
if (fileDatabase == null || modClass == null)
|
||||
{
|
||||
if (fileDatabase == null || modClass == null) {
|
||||
return false
|
||||
}
|
||||
//此处在这里判断的目的是将所有文件录入数据库
|
||||
|
@ -168,7 +168,8 @@ class AllUnitsFragment(
|
|||
dataList.add(sourceFileClass)
|
||||
}
|
||||
val fileTable = FileDataBase.createFileInfoFromFile(file)
|
||||
if (fileDatabase!!.getFileInfoDao().findFileInfoByPath(file.absolutePath) == null
|
||||
if (fileDatabase!!.getFileInfoDao()
|
||||
.findFileInfoByPath(file.absolutePath) == null
|
||||
) {
|
||||
fileDatabase!!.getFileInfoDao().insert(fileTable)
|
||||
} else {
|
||||
|
@ -190,24 +191,22 @@ class AllUnitsFragment(
|
|||
viewBinding.swipeRefreshLayout.isVisible = true
|
||||
viewBinding.progressBar.isVisible = false
|
||||
viewBinding.unitError.isVisible = false
|
||||
if (isAdded) {
|
||||
val adapter = UnitAdapter(requireContext(), dataList, "")
|
||||
adapter.setItemEvent { i, unitItemBinding, viewHolder, sourceFileClass ->
|
||||
unitItemBinding.root.setOnClickListener {
|
||||
openEditActivity(sourceFileClass)
|
||||
}
|
||||
val adapter = UnitAdapter(requireContext(), dataList, "")
|
||||
adapter.setItemEvent { i, unitItemBinding, viewHolder, sourceFileClass ->
|
||||
unitItemBinding.root.setOnClickListener {
|
||||
openEditActivity(sourceFileClass)
|
||||
}
|
||||
adapter.setItemChangeEvent { changeType, i, sourceFileClass, i2 ->
|
||||
whenNumberChanged?.invoke(i2)
|
||||
if (i2 == 0) {
|
||||
loadFiles()
|
||||
}
|
||||
}
|
||||
FastScrollerBuilder(viewBinding.unitList).useMd2Style()
|
||||
.setPopupTextProvider(adapter).build()
|
||||
viewBinding.unitList.adapter = adapter
|
||||
whenNumberChanged?.invoke(dataList.size)
|
||||
}
|
||||
adapter.setItemChangeEvent { changeType, i, sourceFileClass, i2 ->
|
||||
whenNumberChanged?.invoke(i2)
|
||||
if (i2 == 0) {
|
||||
loadFiles()
|
||||
}
|
||||
}
|
||||
FastScrollerBuilder(viewBinding.unitList).useMd2Style()
|
||||
.setPopupTextProvider(adapter).build()
|
||||
viewBinding.unitList.adapter = adapter
|
||||
whenNumberChanged?.invoke(dataList.size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -247,10 +247,10 @@ class ModFragment : BaseFragment<FragmentModBinding>() {
|
|||
configurationManager?.readData()
|
||||
val works: MutableList<String> = ArrayList()
|
||||
if (modClass.modFile.isDirectory) {
|
||||
val developerMode = AppSettings.getValue(AppSettings.Setting.DeveloperMode, false)
|
||||
if (developerMode) {
|
||||
works.add(getString(R.string.generate_error_report))
|
||||
}
|
||||
// val developerMode = AppSettings.getValue(AppSettings.Setting.DeveloperMode, false)
|
||||
// if (developerMode) {
|
||||
// works.add(getString(R.string.generate_error_report))
|
||||
// }
|
||||
if (GlobalMethod.isActive) {
|
||||
works.add(getString(R.string.mod_action1))
|
||||
if (modClass.hasInfo()) {
|
||||
|
|
|
@ -703,7 +703,7 @@
|
|||
<string name="renewal">续费</string>
|
||||
<string name="renewal_tip_title">续费提醒</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="report">举报</string>
|
||||
<string name="report_t">举报-%1$s</string>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
include ':app'
|
||||
rootProject.name = "铁锈助手"
|
||||
rootProject.name = "RustedAssistant"
|
||||
include ':assistantCoreLibrary'
|
||||
include ':dialog'
|
||||
|
|
Loading…
Reference in New Issue
Block a user