Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions app/src/main/java/org/autojs/autojs/ui/log/LogBottomSheet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,26 +79,24 @@ class LogBottomSheet : BottomSheetDialogFragment() {
}

// Setup ConsoleView with global console
val autoJs = AutoJs.getInstance()
if (autoJs != null) {
binding.console.setConsole(autoJs.globalConsole)

// Hide input container (not needed in bottom sheet)
binding.console.findViewById<View>(R.id.input_container)?.visibility = View.GONE

// Enable clickable stack frame links (only in bottom sheet, not in LogActivity)
binding.console.setEnableStackFrameLinks(true)

// Set up clickable stack frame listener
binding.console.setOnStackFrameClickListener { fileName, lineNumber, columnNumber ->
mStackFrameClickListener?.onStackFrameClick(fileName, lineNumber, columnNumber)
dismiss()
}
val autoJs = AutoJs.instance
binding.console.setConsole(autoJs.globalConsole)

// Hide input container (not needed in bottom sheet)
binding.console.findViewById<View>(R.id.input_container)?.visibility = View.GONE

// Enable clickable stack frame links (only in bottom sheet, not in LogActivity)
binding.console.setEnableStackFrameLinks(true)

// Set up clickable stack frame listener
binding.console.setOnStackFrameClickListener { fileName, lineNumber, columnNumber ->
mStackFrameClickListener?.onStackFrameClick(fileName, lineNumber, columnNumber)
dismiss()
}

// Clear button
binding.btnClear.setOnClickListener {
AutoJs.getInstance()?.globalConsole?.clear()
AutoJs.instance.globalConsole.clear()
}

// Open full log activity button
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/bottom_sheet_log.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
android:id="@+id/console"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:color_debug="@color/console_debug"
app:color_verbose="@color/console_verbose"/>
app:color_debug="@color/console_view_debug"
app:color_verbose="@color/console_view_verbose"/>

</FrameLayout>

Expand Down