File tree Expand file tree Collapse file tree
krscript/src/main/java/com/omarea/krscript/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,9 +107,9 @@ class DialogLogFragment : androidx.fragment.app.DialogFragment() {
107107 val clipboard = requireContext().getSystemService(Context .CLIPBOARD_SERVICE ) as ClipboardManager
108108 val clip = ClipData .newPlainText(" text" , binding?.shellOutput?.text.toString())
109109 clipboard.setPrimaryClip(clip)
110- Toast .makeText(context , getString(R .string.copy_success), Toast .LENGTH_SHORT ).show()
110+ Toast .makeText(requireContext() , getString(R .string.copy_success), Toast .LENGTH_SHORT ).show()
111111 } catch (e: Exception ) {
112- Toast .makeText(context , getString(R .string.copy_fail), Toast .LENGTH_SHORT ).show()
112+ Toast .makeText(requireContext() , getString(R .string.copy_fail), Toast .LENGTH_SHORT ).show()
113113 }
114114 }
115115
@@ -294,6 +294,11 @@ class DialogLogFragment : androidx.fragment.app.DialogFragment() {
294294 binding = null
295295 }
296296
297+ override fun onDestroy () {
298+ offScreen()
299+ super .onDestroy()
300+ }
301+
297302 companion object {
298303 fun create (
299304 nodeInfo : RunnableNode ,
You can’t perform that action at this time.
0 commit comments