整理:清理不必要的TODO标记

This commit is contained in:
pppscn 2022-06-08 09:09:18 +08:00
parent d2969ef213
commit fefa4b0ab3
13 changed files with 21 additions and 22 deletions

View File

@ -331,7 +331,7 @@ class MainActivity : BaseActivity<ActivityMainBinding?>(),
@Suppress("UNCHECKED_CAST")
PageOption.to(Class.forName(widgetInfo.classPath) as Class<XPageFragment>) //跳转的fragment
.setNewActivity(true)
.putInt(KEY_SENDER_TYPE, pos) //TODO需要注意这里目前刚好是这个顺序而已
.putInt(KEY_SENDER_TYPE, pos) //注意:目前刚好是这个顺序而已
.open(this)
} catch (e: Exception) {
e.printStackTrace()

View File

@ -24,7 +24,7 @@ class AppListAdapterItem {
constructor(name: String) : this(name, null, null)
constructor(name: String, drawableId: Int, packageName: String) : this(name, ResUtils.getDrawable(drawableId), packageName)
//TODO:注意自定义实体需要重写对象的toString方法
//注意自定义实体需要重写对象的toString方法
override fun toString(): String {
return name
}

View File

@ -71,7 +71,7 @@ class SenderAdapterItem {
return this
}
//TODO:注意自定义实体需要重写对象的toString方法
//注意自定义实体需要重写对象的toString方法
override fun toString(): String {
return title.toString()
}

View File

@ -94,9 +94,9 @@ class WebViewInterceptDialog : AppCompatActivity(), DialogInterface.OnDismissLis
companion object {
private const val KEY_INTERCEPT_URL = "key_intercept_url"
// TODO: 2019-10-30 这里修改你的applink
const val APP_LINK_HOST = "xuexiangjys.club"
const val APP_LINK_ACTION = "com.xuexiang.xui.applink"
// TODO: 修改你的applink
const val APP_LINK_HOST = "ppps.cn"
const val APP_LINK_ACTION = "com.idormy.sms.forwarder"
/**
* 显示WebView拦截提示

View File

@ -477,9 +477,9 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
else -> CHECK_SIM_SLOT_ALL
}
val status = if (binding!!.sbStatus.isChecked) STATUS_ON else STATUS_OFF
if (status == STATUS_OFF) {
throw Exception(getString(R.string.invalid_rule_status))
}
//if (status == STATUS_OFF) {
// throw Exception(getString(R.string.invalid_rule_status))
//}
return Rule(ruleId, ruleType, filed, check, value, senderId, smsTemplate, regexReplace, simSlot, status)
}

View File

@ -65,7 +65,7 @@ class SendersFragment : BaseFragment<FragmentSendersBinding?>(), SenderPagingAda
binding!!.tabBar.setOnTabClickListener { _, position ->
//XToastUtils.toast("点击了$title--$position")
//currentStatus = statusValueArray[position]
currentStatus = 1 - position //TODO:取巧,这里刚好相反
currentStatus = 1 - position //注意:这里刚好相反,可以取巧
viewModel.setStatus(currentStatus)
adapter.refresh()
binding!!.recyclerView.scrollToPosition(0)

View File

@ -154,7 +154,7 @@ class TelegramFragment : BaseFragment<FragmentSendersTelegramBinding?>(), View.O
}
override fun onCheckedChanged(buttonView: CompoundButton?, isChecked: Boolean) {
//TODO: 这里只有一个监听不需要判断id
//注意:因为只有一个监听,暂不需要判断id
binding!!.layoutProxyAuthenticator.visibility = if (isChecked) View.VISIBLE else View.GONE
}

View File

@ -139,7 +139,7 @@ class WeworkAgentFragment : BaseFragment<FragmentSendersWeworkAgentBinding?>(),
@SuppressLint("SetTextI18n")
override fun onCheckedChanged(buttonView: CompoundButton?, isChecked: Boolean) {
//TODO: 这里只有一个监听不需要判断id
//注意:因为只有一个监听,暂不需要判断id
if (isChecked) {
binding!!.etToUser.setText("@all")
binding!!.layoutToUser.visibility = View.GONE

View File

@ -45,7 +45,7 @@ class LoggerInterceptor : HandlerInterceptor {
}
/*
//TODO:这里读取body会导致 MessageConverter 报错RequestBody is missing.
//注意:这里读取body会导致 MessageConverter 报错RequestBody is missing.
val body = request.body?.string()
Log.i(TAG, "Body: $body")
*/

View File

@ -120,7 +120,7 @@ class PhoneUtils private constructor() {
val sendPI = PendingIntent.getBroadcast(XUtil.getContext(), 0, Intent(), sendFlags)
val smsManager = if (subId > -1 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) SmsManager.getSmsManagerForSubscriptionId(subId) else SmsManager.getDefault()
//TODO: Android 5.1.1 以下使用反射指定卡槽
// Android 5.1.1 以下使用反射指定卡槽
if (subId > -1 && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) {
Log.d(TAG, "Android 5.1.1 以下使用反射指定卡槽")
val clz = SmsManager::class.java
@ -129,7 +129,7 @@ class PhoneUtils private constructor() {
field.set(smsManager, subId)
}
//TODO: 切割长短信
// 切割长短信
if (message.length >= 70) {
val deliverFlags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) PendingIntent.FLAG_IMMUTABLE else 0
val deliverPI = PendingIntent.getBroadcast(XUtil.getContext(), 0, Intent("DELIVERED_SMS_ACTION"), deliverFlags)
@ -172,7 +172,7 @@ class PhoneUtils private constructor() {
Log.d(TAG, "selection = $selection")
Log.d(TAG, "selectionArgs = $selectionArgs")
//TODO避免超过总数后循环取出
// 避免超过总数后循环取出
val cursorTotal = Core.app.contentResolver.query(
CallLog.Calls.CONTENT_URI,
null,
@ -279,7 +279,7 @@ class PhoneUtils private constructor() {
Log.d(TAG, "selection = $selection")
Log.d(TAG, "selectionArgs = $selectionArgs")
//TODO避免超过总数后循环取出
// 避免超过总数后循环取出
val cursorTotal = Core.app.contentResolver.query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
null,
@ -376,7 +376,7 @@ class PhoneUtils private constructor() {
Log.d(TAG, "selection = $selection")
Log.d(TAG, "selectionArgs = $selectionArgs")
//TODO避免超过总数后循环取出
// 避免超过总数后循环取出
val cursorTotal = Core.app.contentResolver.query(
Uri.parse("content://sms/"),
null,

View File

@ -19,7 +19,6 @@ import java.net.Proxy
import java.net.URLEncoder
import java.util.concurrent.TimeUnit
//TODO:待迁移!!!
@Suppress("PrivatePropertyName", "UNUSED_PARAMETER", "unused")
class TelegramUtils {
companion object {

View File

@ -14,7 +14,7 @@ import com.xuexiang.xupdate.proxy.impl.AbstractUpdateParser
class CustomUpdateParser : AbstractUpdateParser() {
@Throws(Exception::class)
override fun parseJson(json: String): UpdateEntity? {
// TODO: 2020-02-18 这里填写你需要自定义的json格式如果使用默认的API就不需要设置
// 填写自定义的json格式如果使用默认的API就不需要设置
return null
}
}

View File

@ -39,10 +39,10 @@ class UpdateTipDialog : AppCompatActivity(), DialogInterface.OnDismissListener {
companion object {
const val KEY_CONTENT = "com.idormy.sms.forwarder.utils.update.KEY_CONTENT"
// TODO: 2021/5/11 填写你应用下载类型名
// 填写你应用下载类型名
const val DOWNLOAD_TYPE_NAME = "酷安"
// TODO: 2021/5/11 填写你应用下载页面的链接
// 填写你应用下载页面的链接
private const val DOWNLOAD_URL = "https://www.coolapk.com/apk/com.idormy.sms.forwarder"
/**