close sessions without waiting for user input except the last one

An attempt to deal with these issues:

 * https://github.com/termux/termux-app/issues/627
 * https://github.com/termux/termux-app/issues/56
This commit is contained in:
Leonid Plyushch 2018-07-31 17:07:46 +03:00 committed by Fredrik Fornwall
parent 68a83ccf37
commit 963663e0cd
1 changed files with 5 additions and 0 deletions

View File

@ -388,6 +388,11 @@ public final class TermuxActivity extends Activity implements ServiceConnection
if (indexOfSession >= 0)
showToast(toToastTitle(finishedSession) + " - exited", true);
}
if (mTermService.getSessions().size() > 1) {
removeFinishedSession(finishedSession);
}
mListViewAdapter.notifyDataSetChanged();
}