Skip to content

Commit 1abb301

Browse files
committed
Upload file
1 parent 35af0cf commit 1abb301

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

krscript/src/main/java/com/omarea/krscript/ui/DialogLogFragment.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)