My places
This commit is contained in:
parent
585534102a
commit
bba9a860e6
3 changed files with 18 additions and 10 deletions
|
@ -75,11 +75,6 @@ public class LoginBottomSheetFragment extends MenuBottomSheetDialogFragment {
|
|||
return getResources().getDimensionPixelSize(R.dimen.card_content_padding_large);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSecondDividerHeight() {
|
||||
return getResources().getDimensionPixelSize(R.dimen.content_padding_small);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRightBottomButtonClick() {
|
||||
FragmentManager fragmentManager = getFragmentManager();
|
||||
|
|
|
@ -54,7 +54,7 @@ public class EditPOIMenuController extends MenuController {
|
|||
SimpleProgressDialogPoiUploader poiDialogUploader = new SimpleProgressDialogPoiUploader(activity);
|
||||
poiDialogUploader.showProgressDialog(new OsmPoint[] {getOsmPoint()}, false, false);
|
||||
} else {
|
||||
LoginBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), activity.getLoginBottomSheetFragment());
|
||||
LoginBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import androidx.appcompat.app.AlertDialog;
|
|||
import androidx.appcompat.view.ActionMode;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
|
@ -41,6 +42,8 @@ import net.osmand.osm.edit.Entity;
|
|||
import net.osmand.osm.edit.Node;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.measurementtool.LoginBottomSheetFragment;
|
||||
import net.osmand.plus.osmedit.oauth.OsmOAuthAuthorizationAdapter;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.Version;
|
||||
|
@ -624,10 +627,20 @@ public class OsmEditsFragment extends OsmAndListFragment implements SendPoiDialo
|
|||
}
|
||||
|
||||
private void uploadItems(final OsmPoint[] items) {
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null) {
|
||||
OsmandApplication app = getMyApplication();
|
||||
OsmandSettings settings = app.getSettings();
|
||||
OsmOAuthAuthorizationAdapter authorizationAdapter = new OsmOAuthAuthorizationAdapter(app);
|
||||
if (authorizationAdapter.isValidToken()
|
||||
|| !Algorithms.isEmpty(settings.USER_NAME.get())
|
||||
&& !Algorithms.isEmpty(settings.USER_PASSWORD.get())) {
|
||||
SendPoiDialogFragment.createInstance(items, PoiUploaderType.FRAGMENT)
|
||||
.show(getChildFragmentManager(), SendPoiDialogFragment.TAG);
|
||||
// UploadOsmEditsConfirmDialogFragment.createInstancee(items).show(getChildFragmentManager(),
|
||||
// UploadOsmEditsConfirmDialogFragment.TAG);
|
||||
} else {
|
||||
LoginBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void showProgressDialog(OsmPoint[] points, boolean closeChangeSet, boolean anonymously) {
|
||||
|
|
Loading…
Reference in a new issue