fixed application fall because of Toast created in background thread

This commit is contained in:
Denis 2014-07-14 16:39:15 +04:00
parent 232defc197
commit c6a89ee7b9

View file

@ -178,13 +178,13 @@ public class GpxImportHelper {
favoritesHelper.addFavourite(favourite, false);
}
favoritesHelper.saveCurrentPointsIntoFile();
AccessibleToast.makeText(mapActivity, R.string.fav_imported_sucessfully, Toast.LENGTH_LONG).show();
return null;
}
@Override
protected void onPostExecute(GPXUtilities.GPXFile result) {
progress.dismiss();
AccessibleToast.makeText(mapActivity, R.string.fav_imported_sucessfully, Toast.LENGTH_LONG).show();
final Intent newIntent = new Intent(mapActivity, application.getAppCustomization().getFavoritesActivity());
mapActivity.startActivity(newIntent);
}