Simplify group management

Conflicts:
	OsmAnd/res/values/strings.xml
This commit is contained in:
Victor Shcherb 2014-07-31 01:31:56 +02:00
parent 64daabc5c7
commit a8b37cd0ac
2 changed files with 10 additions and 1 deletions

View file

@ -11,6 +11,7 @@
-->
<string name="map_preferred_locale_descr">Preferred lanaguage for labels on the map (if it is not available will switch to English or to local names)</string>
<string name="map_preferred_locale">Map prefferred language</string>
<string name="osmo_invite">Invite...</string>
<string name="osmo_leave_confirmation_msg">Do you want to leave group %1$s?</string>
<string name="osmo_specify_tracker_id">Please specify id</string>
<string name="continue_navigation">Continue Navigation</string>

View file

@ -504,7 +504,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
protected void showGroupInfo(OsMoGroup group) {
protected void showGroupInfo(final OsMoGroup group) {
Builder bld = new AlertDialog.Builder(this);
bld.setTitle(R.string.osmo_group);
StringBuilder sb = new StringBuilder();
@ -530,6 +530,13 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
tv.setText(sb.toString());
bld.setView(sv);
bld.setPositiveButton(R.string.default_buttons_ok, null);
bld.setNegativeButton(R.string.osmo_invite, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
shareOsMoGroup(group.getVisibleName(app), group.getGroupId());
}
});
bld.show();
}
@ -785,6 +792,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
if(!checkOperationIsNotRunning()) {
return ;
}
joinGroup = true;
String op = osMoPlugin.getGroups().createGroup(name.getText().toString(), onlyByInvite.isChecked(),
description.getText().toString(), policy.getText().toString());
startLongRunningOperation(op);