Display comment in dialog
This commit is contained in:
parent
8a1d8b83cb
commit
153f98a7d7
1 changed files with 4 additions and 1 deletions
|
@ -56,7 +56,6 @@ public class SendPoiDialogFragment extends DialogFragment {
|
|||
final View passwordLabel = view.findViewById(R.id.osm_user_password_label);
|
||||
final CheckBox closeChangeSetCheckBox =
|
||||
(CheckBox) view.findViewById(R.id.close_change_set_checkbox);
|
||||
messageEditText.setText(comment);
|
||||
final OsmandSettings settings = ((OsmandApplication) getActivity().getApplication())
|
||||
.getSettings();
|
||||
userNameEditText.setText(settings.USER_NAME.get());
|
||||
|
@ -65,10 +64,14 @@ public class SendPoiDialogFragment extends DialogFragment {
|
|||
assert poi != null;
|
||||
for (OsmPoint p : poi) {
|
||||
if (p.getGroup() == OsmPoint.Group.POI) {
|
||||
if (comment == null || comment.equals("")) {
|
||||
comment = ((OpenstreetmapPoint) p).getComment();
|
||||
}
|
||||
hasPoiGroup = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
messageEditText.setText(comment);
|
||||
final boolean hasPOI = hasPoiGroup;
|
||||
messageLabel.setVisibility(hasPOI ? View.VISIBLE : View.GONE);
|
||||
messageEditText.setVisibility(hasPOI ? View.VISIBLE : View.GONE);
|
||||
|
|
Loading…
Reference in a new issue