mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 01:17:41 +08:00
优化:未开启异步获取已安装App信息开关时,规则编辑不显示已安装APP下拉框
This commit is contained in:
parent
c8a0c6e70c
commit
9c63910369
@ -364,9 +364,12 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
|||||||
private fun initAppSpinner() {
|
private fun initAppSpinner() {
|
||||||
if (ruleType != "app") return
|
if (ruleType != "app") return
|
||||||
|
|
||||||
|
//未开启异步获取已安装App信息开关时,规则编辑不显示已安装APP下拉框
|
||||||
|
if (!SettingUtils.enableLoadUserAppList && !SettingUtils.enableLoadSystemAppList) return
|
||||||
|
|
||||||
val get = GlobalScope.async(Dispatchers.IO) {
|
val get = GlobalScope.async(Dispatchers.IO) {
|
||||||
if ((SettingUtils.enableLoadUserAppList && App.UserAppList.isEmpty())
|
if ((SettingUtils.enableLoadUserAppList && App.UserAppList.isEmpty())
|
||||||
|| SettingUtils.enableLoadSystemAppList && App.SystemAppList.isEmpty()
|
|| (SettingUtils.enableLoadSystemAppList && App.SystemAppList.isEmpty())
|
||||||
) {
|
) {
|
||||||
App.UserAppList.clear()
|
App.UserAppList.clear()
|
||||||
App.SystemAppList.clear()
|
App.SystemAppList.clear()
|
||||||
@ -399,6 +402,9 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//列表为空也不显示下拉框
|
||||||
|
if (appListSpinnerList.isEmpty()) return@runCatching
|
||||||
|
|
||||||
appListSpinnerAdapter = AppListSpinnerAdapter(appListSpinnerList)
|
appListSpinnerAdapter = AppListSpinnerAdapter(appListSpinnerList)
|
||||||
//.setTextColor(ResUtils.getColor(R.color.green))
|
//.setTextColor(ResUtils.getColor(R.color.green))
|
||||||
//.setTextSize(12F)
|
//.setTextSize(12F)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user