Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
80783079f5
3 changed files with 16 additions and 11 deletions
|
@ -114,7 +114,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
}
|
||||
|
||||
private void deleteFavorites() {
|
||||
new AsyncTask<Void, Object, String>() {
|
||||
new AsyncTask<Void, Object, Void>() {
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
|
@ -122,17 +122,17 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(String result) {
|
||||
protected void onPostExecute(Void result) {
|
||||
hideProgressBar();
|
||||
favouritesAdapter.synchronizeGroups();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doInBackground(Void... params) {
|
||||
protected Void doInBackground(Void... params) {
|
||||
helper.delete(groupsToDelete, getSelectedFavorites());
|
||||
favoritesSelected.clear();
|
||||
groupsToDelete.clear();
|
||||
return getString(R.string.favourites_delete_multiple_succesful);
|
||||
return null;
|
||||
}
|
||||
|
||||
}.execute();
|
||||
|
|
|
@ -16,6 +16,7 @@ import net.osmand.AndroidUtils;
|
|||
import net.osmand.data.LatLon;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.IconsCache;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.TargetPointsHelper;
|
||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||
|
@ -50,7 +51,7 @@ public class DestinationReachedMenuFragment extends Fragment {
|
|||
view.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismissMenu();
|
||||
dismissMenu(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -61,7 +62,7 @@ public class DestinationReachedMenuFragment extends Fragment {
|
|||
closeImageButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismissMenu();
|
||||
dismissMenu(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -81,7 +82,7 @@ public class DestinationReachedMenuFragment extends Fragment {
|
|||
getMapActivity().getContextMenu().close();
|
||||
}
|
||||
}
|
||||
dismissMenu();
|
||||
dismissMenu(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -95,7 +96,7 @@ public class DestinationReachedMenuFragment extends Fragment {
|
|||
TargetPointsHelper helper = getMapActivity().getMyApplication().getTargetPointsHelper();
|
||||
TargetPoint target = helper.getPointToNavigate();
|
||||
|
||||
dismissMenu();
|
||||
dismissMenu(false);
|
||||
|
||||
if (target != null) {
|
||||
helper.navigateToPoint(new LatLon(target.getLatitude(), target.getLongitude()),
|
||||
|
@ -129,7 +130,7 @@ public class DestinationReachedMenuFragment extends Fragment {
|
|||
newIntent.putExtra(SearchActivity.SEARCH_NEARBY, true);
|
||||
startActivityForResult(newIntent, 0);
|
||||
}
|
||||
dismissMenu();
|
||||
dismissMenu(false);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -181,7 +182,11 @@ public class DestinationReachedMenuFragment extends Fragment {
|
|||
.addToBackStack(TAG).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
public void dismissMenu() {
|
||||
public void dismissMenu(boolean restoreAppMode) {
|
||||
if (restoreAppMode) {
|
||||
OsmandSettings settings = getMapActivity().getMyApplication().getSettings();
|
||||
settings.APPLICATION_MODE.set(settings.DEFAULT_APPLICATION_MODE.get());
|
||||
}
|
||||
getMapActivity().getMapActions().stopNavigationWithoutConfirm();
|
||||
getMapActivity().getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
|
|
|
@ -549,7 +549,7 @@ public class RoutingHelper {
|
|||
@Override
|
||||
public void run() {
|
||||
settings.LAST_ROUTING_APPLICATION_MODE = settings.APPLICATION_MODE.get();
|
||||
settings.APPLICATION_MODE.set(settings.DEFAULT_APPLICATION_MODE.get());
|
||||
//settings.APPLICATION_MODE.set(settings.DEFAULT_APPLICATION_MODE.get());
|
||||
}
|
||||
});
|
||||
finishCurrentRoute();
|
||||
|
|
Loading…
Reference in a new issue