mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-09 12:06:09 +01:00
Fixed: Fix termux session shortcuts not working after TermuxActivity recreation
The `List<KeyboardShortcut> mSessionShortcuts = new ArrayList<>()` declaration was causing shortcuts list to be of size 0 in `TermuxTerminalViewClient.onCodePoint()` after re-creation, which resulted in session shortcuts not working.
This commit is contained in:
parent
81dd113157
commit
4fd48a5aed
1 changed files with 2 additions and 5 deletions
|
|
@ -22,7 +22,7 @@ import java.util.Map;
|
|||
public class TermuxAppSharedProperties extends TermuxSharedProperties {
|
||||
|
||||
private ExtraKeysInfo mExtraKeysInfo;
|
||||
private List<KeyboardShortcut> mSessionShortcuts = new ArrayList<>();
|
||||
private List<KeyboardShortcut> mSessionShortcuts;
|
||||
|
||||
private static final String LOG_TAG = "TermuxAppSharedProperties";
|
||||
|
||||
|
|
@ -80,10 +80,7 @@ public class TermuxAppSharedProperties extends TermuxSharedProperties {
|
|||
* Set the terminal sessions shortcuts.
|
||||
*/
|
||||
private void setSessionShortcuts() {
|
||||
if (mSessionShortcuts == null)
|
||||
mSessionShortcuts = new ArrayList<>();
|
||||
else
|
||||
mSessionShortcuts.clear();
|
||||
mSessionShortcuts = new ArrayList<>();
|
||||
|
||||
// The {@link TermuxPropertyConstants#MAP_SESSION_SHORTCUTS} stores the session shortcut key and action pair
|
||||
for (Map.Entry<String, Integer> entry : TermuxPropertyConstants.MAP_SESSION_SHORTCUTS.entrySet()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue