do not display toast if activity is finishing
This commit is contained in:
parent
0b0b583e32
commit
4d4f63be20
|
@ -698,11 +698,10 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
||||||
|
|
||||||
private void displayToast(final String msg) {
|
private void displayToast(final String msg) {
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
try {
|
if (isFinishing()) {
|
||||||
Toast.makeText(ConferenceDetailsActivity.this, msg, Toast.LENGTH_SHORT).show();
|
return;
|
||||||
} catch (WindowManager.BadTokenException e) {
|
|
||||||
Log.e(Config.LOGTAG,"unable to display toast '"+msg+"'. Activity not running");
|
|
||||||
}
|
}
|
||||||
|
Toast.makeText(ConferenceDetailsActivity.this, msg, Toast.LENGTH_SHORT).show();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue