Init
This commit is contained in:
parent
1b1132148f
commit
290f3af026
2 changed files with 8 additions and 3 deletions
|
@ -256,6 +256,8 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme
|
|||
public void onClick(View view) {
|
||||
if (article != null) {
|
||||
if (saved) {
|
||||
GPXFile gpxFile = article.getGpxFile();
|
||||
getMyApplication().getSelectedGpxHelper().selectGpxFile(gpxFile, false, true);
|
||||
helper.removeArticleFromSaved(article);
|
||||
} else {
|
||||
getMyApplication().getTravelHelper().createGpxFile(article);
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.squareup.picasso.Callback;
|
|||
import com.squareup.picasso.Picasso;
|
||||
import com.squareup.picasso.RequestCreator;
|
||||
|
||||
import net.osmand.GPXUtilities;
|
||||
import net.osmand.PicassoUtils;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
|
@ -102,10 +103,12 @@ public class ArticleTravelCard extends BaseTravelCard {
|
|||
public void onClick(View view) {
|
||||
if (article != null) {
|
||||
if (saved) {
|
||||
GPXUtilities.GPXFile gpxFile = article.getGpxFile();
|
||||
app.getSelectedGpxHelper().selectGpxFile(gpxFile, false, true);
|
||||
helper.removeArticleFromSaved(article);
|
||||
} else {
|
||||
app.getTravelHelper().createGpxFile(article);
|
||||
helper.addArticleToSaved(article);
|
||||
app.getTravelHelper().createGpxFile(article);
|
||||
}
|
||||
updateSaveButton(holder);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue