1
0
mirror of https://github.com/etesync/android synced 2025-02-02 19:01:06 +00:00

Journal sharing: Add a nice error message when journal is not found.

This commit is contained in:
Tom Hacohen 2017-04-21 10:31:58 +01:00
parent 5c2601f408
commit f8d0878003
2 changed files with 6 additions and 1 deletions

View File

@ -82,7 +82,11 @@ public class AddMemberFragment extends DialogFragment {
try {
UserInfoManager userInfoManager = new UserInfoManager(httpClient, remote);
memberPubKey = userInfoManager.get(memberEmail).getPubkey();
UserInfoManager.UserInfo userInfo = userInfoManager.get(memberEmail);
if (userInfo == null) {
throw new Exception(getString(R.string.collection_members_error_user_not_found, memberEmail));
}
memberPubKey = userInfo.getPubkey();
return new AddResult(null);
} catch (Exception e) {
return new AddResult(e);

View File

@ -119,6 +119,7 @@
<string name="collection_members_adding">Adding member</string>
<string name="trust_fingerprint_title">Verify security fingerprint</string>
<string name="trust_fingerprint_body">Verify %s\'s security fingerprint to ensure the encryption is secure.</string>
<string name="collection_members_error_user_not_found">User (%s) not found, or has journal sharing disabled.</string>
<string name="collection_members_removing">Removing member</string>
<string name="collection_members_remove_error">Error removing member</string>
<string name="collection_members_remove_title">Remove member</string>