Skip to content

Commit 4678801

Browse files
committed
Changes per PR feedback
Use dialog instead of toast to notify user that no terminal app can be found.
1 parent 3e01412 commit 4678801

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

app/src/main/java/com/amaze/filemanager/ui/dialogs/OpenFolderInTerminalFragment.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ class OpenFolderInTerminalFragment : BaseBottomSheetFragment(), AdjustListViewFo
9494
) {
9595
val installedTerminals = activity.detectInstalledTerminalApps()
9696
if (installedTerminals.isEmpty()) {
97-
AppConfig.toast(activity, "No Terminal App installed")
97+
AlertDialog.show(
98+
activity,
99+
title = R.string.no_terminal_apps,
100+
content = R.string.no_terminal_apps_message,
101+
contentIsHtml = true,
102+
)
98103
} else if (installedTerminals.size == 1) {
99104
startActivity(activity, buildIntent(installedTerminals.first(), path))
100105
} else {

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,5 +850,7 @@ You only need to do this once, until the next time you select a new location for
850850
<string name="trash_bin_retention_bytes_summary">Maximum data (in MBs) trash bin can store</string>
851851
<string name="trash_bin_cleanup_interval_title">Cleanup interval</string>
852852
<string name="trash_bin_cleanup_interval_summary">Trigger auto-cleanup interval (hours)</string>
853+
<string name="no_terminal_apps">No Terminal Apps installed</string>
854+
<string name="no_terminal_apps_message"><![CDATA[<p>No terminal apps can be found on this device.</p>\n<p>Please install one of the following terminal app first to use this feature:\n<ul>\n<li><a href=\"https://termoneplus.com/\">Termone Plus</a></li>\n<li><a href=\"https://termux.dev\">Termux</a> (You may need <a href=\"https://github.com/termux/termux-tasker#allow-external-apps-property-optional\">additional configuration</a> too)</li>\n<li><a href=\"https://github.com/jackpal/Android-Terminal-Emulator\">Jack Palovich\'s Android Terminal Emulator</a> (no longer in development)</li>\n</ul>\n</p>]]></string>
853855
</resources>
854856

0 commit comments

Comments
 (0)