File tree Expand file tree Collapse file tree
app/src/main/java/com/rk/taskmanager/screens Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -619,15 +619,17 @@ fun ProcessInfo(
619619 Spacer (modifier = Modifier .width(8 .dp))
620620
621621 TextButton (onClick = {
622- showKillDialog = null
622+ val dialog = showKillDialog
623623
624624 viewModel.viewModelScope.launch {
625- showKillDialog ?.killing?.value = true
626- showKillDialog ?.killed?.value = killProc(showKillDialog ?.proc!! )
625+ dialog ?.killing?.value = true
626+ dialog ?.killed?.value = killProc(dialog ?.proc!! )
627627 delay(300 )
628- showKillDialog ?.killing?.value = false
628+ dialog ?.killing?.value = false
629629 }
630630
631+ showKillDialog = null
632+
631633 }) {
632634 Text (
633635 text = " Kill" ,
Original file line number Diff line number Diff line change @@ -426,15 +426,20 @@ fun ProcessItem(
426426 Spacer (modifier = Modifier .width(8 .dp))
427427
428428 TextButton (onClick = {
429- showKillDialog = null
429+
430+
431+ val dialog = showKillDialog
430432
431433 viewModel.viewModelScope.launch {
432- showKillDialog ?.killing?.value = true
433- showKillDialog ?.killed?.value = killProc(showKillDialog ?.proc!! )
434+ dialog ?.killing?.value = true
435+ dialog ?.killed?.value = killProc(dialog ?.proc!! )
434436 delay(300 )
435- showKillDialog ?.killing?.value = false
437+ dialog ?.killing?.value = false
436438 }
437439
440+ showKillDialog = null
441+
442+
438443 }) {
439444 Text (
440445 text = " Kill" ,
You can’t perform that action at this time.
0 commit comments