[6.7.0]修复工单上报和故障上报多个窗口时关闭错误

This commit is contained in:
xuxinchao
2024-10-11 15:32:48 +08:00
parent 6dd6f25dd1
commit a0c87b48a7
3 changed files with 5 additions and 5 deletions

View File

@@ -220,7 +220,7 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
@SuppressLint("SetTextI18n")
private fun initEvent() {
CallerDevaToolsListenerManager.addListener(TAG, this)
CallerDevaToolsListenerManager.addListener(this.hashCode().toString(), this)
val iconDown = ContextCompat.getDrawable(mActivity, R.drawable.icon_fault_expand)
iconDown?.setBounds(0, 0, iconDown.minimumWidth, iconDown.minimumHeight)
val iconUp = ContextCompat.getDrawable(mActivity, R.drawable.icon_fault_retract)
@@ -558,7 +558,7 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
fun hideFloatWindow() {
etNoteInput.clearFocus()
CallerDevaToolsListenerManager.removeListener(TAG)
CallerDevaToolsListenerManager.removeListener(this.hashCode().toString())
if (mFloatLayout.parent != null) {
mWindowManager!!.removeView(mFloatLayout)
}

View File

@@ -135,7 +135,7 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
@OptIn(DelicateCoroutinesApi::class)
@SuppressLint("SetTextI18n")
private fun initEvent(){
CallerDevaToolsListenerManager.addListener(TAG, this)
CallerDevaToolsListenerManager.addListener(this.hashCode().toString(), this)
//弹窗展示时间
tvWorkOrderTime.text = mActivity.resources.getString(R.string.work_order_time) +
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
@@ -382,7 +382,7 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
if (mFloatLayout.parent != null){
mWindowManager!!.removeView(mFloatLayout)
}
CallerDevaToolsListenerManager.removeListener(TAG)
CallerDevaToolsListenerManager.removeListener(this.hashCode().toString())
}
override fun workOrderReportSuccess() {