mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-01 08:45:16 +08:00
Modify move unable read errors data on-time tip to AppErrorsDetailActivity
This commit is contained in:
@@ -61,6 +61,19 @@ class AppErrorsDetailActivity : BaseActivity<ActivityAppErrorsDetailBinding>() {
|
||||
override fun onCreate() {
|
||||
val appErrorsInfo = runCatching { intent?.getSerializableExtraCompat<AppErrorsInfoBean>(EXTRA_APP_ERRORS_INFO) }.getOrNull()
|
||||
?: return toastAndFinish(name = "AppErrorsInfo")
|
||||
if (appErrorsInfo.isEmpty) {
|
||||
binding.appPanelScrollView.isVisible = false
|
||||
showDialog {
|
||||
title = LocaleString.notice
|
||||
msg = LocaleString.unableGetAppErrorsRecordTip
|
||||
confirmButton(LocaleString.gotIt) {
|
||||
cancel()
|
||||
finish()
|
||||
}
|
||||
noCancelable()
|
||||
}
|
||||
return
|
||||
}
|
||||
binding.appInfoItem.setOnClickListener { openSelfSetting(appErrorsInfo.packageName) }
|
||||
binding.titleBackIcon.setOnClickListener { onBackPressed() }
|
||||
binding.printIcon.setOnClickListener {
|
||||
|
@@ -85,10 +85,8 @@ class AppErrorsDisplayActivity : BaseActivity<ActivityAppErrorsDisplayBinding>()
|
||||
}
|
||||
binding.errorDetailItem.setOnClickListener {
|
||||
FrameworkTool.fetchAppErrorInfoData(context, appErrorsDisplay.pid) { appErrorsInfo ->
|
||||
appErrorsInfo.takeIf { it.isEmpty.not() }?.also {
|
||||
AppErrorsDetailActivity.start(context, it)
|
||||
cancel()
|
||||
} ?: toast(LocaleString.unableGetAppErrorsRecordTip)
|
||||
AppErrorsDetailActivity.start(context, appErrorsInfo)
|
||||
cancel()
|
||||
}
|
||||
}
|
||||
binding.mutedIfUnlockItem.setOnClickListener {
|
||||
|
Reference in New Issue
Block a user