1
0
mirror of https://github.com/etesync/android synced 2025-01-11 08:10:58 +00:00

Disallow sharing of address books.

At the moment we only support one address book per user, and sharing
address books will interfere with this model. Hopefully, we'll add
multiple address book support in the next release, and then we'll
re-enable this.
This commit is contained in:
Tom Hacohen 2017-04-19 16:24:24 +01:00
parent 93fb1e3c54
commit d3057f86f0
2 changed files with 14 additions and 1 deletions

View File

@ -188,7 +188,19 @@ public class ViewCollectionActivity extends AppCompatActivity implements Refresh
} }
public void onManageMembers(MenuItem item) { public void onManageMembers(MenuItem item) {
if (isOwner) { if (info.type.equals(CollectionInfo.Type.ADDRESS_BOOK)) {
AlertDialog dialog = new AlertDialog.Builder(this)
.setIcon(R.drawable.ic_info_dark)
.setTitle(R.string.not_allowed_title)
.setMessage(R.string.members_address_book_not_allowed)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}).create();
dialog.show();
} else if (isOwner) {
startActivity(CollectionMembersActivity.newIntent(this, account, info)); startActivity(CollectionMembersActivity.newIntent(this, account, info));
} else { } else {
AlertDialog dialog = new AlertDialog.Builder(this) AlertDialog dialog = new AlertDialog.Builder(this)

View File

@ -106,6 +106,7 @@
<string name="members_owner_only">Only the owner of this collection (%s) is allowed to view its members.</string> <string name="members_owner_only">Only the owner of this collection (%s) is allowed to view its members.</string>
<string name="not_allowed_title">Not Allowed</string> <string name="not_allowed_title">Not Allowed</string>
<string name="edit_owner_only">Only the owner of this collection (%s) is allowed to edit it.</string> <string name="edit_owner_only">Only the owner of this collection (%s) is allowed to edit it.</string>
<string name="members_address_book_not_allowed">Sharing of address books is currently not supported.</string>
<!-- CollectionMembers --> <!-- CollectionMembers -->
<string name="collection_members_title">Members</string> <string name="collection_members_title">Members</string>