forked from mirror/monocles_chat_clean
do not display toast if activity is finishing
This commit is contained in:
parent
cd0975bb36
commit
9a5e6e1118
1 changed files with 3 additions and 4 deletions
|
@ -698,11 +698,10 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
|||
|
||||
private void displayToast(final String msg) {
|
||||
runOnUiThread(() -> {
|
||||
try {
|
||||
Toast.makeText(ConferenceDetailsActivity.this, msg, Toast.LENGTH_SHORT).show();
|
||||
} catch (WindowManager.BadTokenException e) {
|
||||
Log.e(Config.LOGTAG,"unable to display toast '"+msg+"'. Activity not running");
|
||||
if (isFinishing()) {
|
||||
return;
|
||||
}
|
||||
Toast.makeText(ConferenceDetailsActivity.this, msg, Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue