fix: 静态检查修复(访问权限+生命周期清理)
1. MainActivity.notificationBanner 改为非 private (HomeFragment 需访问设置点击回调,原 private 编译报错) 2. HomeFragment.onDestroyView 补充清理 bannerView.onClick (避免 Fragment 销毁后回调泄漏) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -37,8 +37,8 @@ class MainActivity : AppCompatActivity() {
|
||||
/** 事件总线 */
|
||||
@Inject lateinit var eventBus: EventBus
|
||||
|
||||
/** 通知横幅 */
|
||||
private lateinit var notificationBanner: NotificationBannerView
|
||||
/** 通知横幅(HomeFragment 需访问设置点击回调) */
|
||||
lateinit var notificationBanner: NotificationBannerView
|
||||
|
||||
/** Activity 协程作用域 */
|
||||
private val activityScope = CoroutineScope(Dispatchers.Main + SupervisorJob())
|
||||
|
||||
Reference in New Issue
Block a user