Collection owner: Handle the case of owner == null.

pull/14/head
Tom Hacohen 7 years ago
parent 201e4e09eb
commit fab8aa90ac

@ -417,7 +417,8 @@ public class AccountActivity extends AppCompatActivity implements Toolbar.OnMenu
readOnly.setVisibility(journalEntity.isReadOnly() ? View.VISIBLE : View.GONE);
final View shared = v.findViewById(R.id.shared);
shared.setVisibility(account.name.equals(journalEntity.getOwner()) ? View.GONE : View.VISIBLE);
boolean isOwner = (journalEntity.getOwner() == null) || journalEntity.getOwner().equals(account.name);
shared.setVisibility(isOwner ? View.GONE : View.VISIBLE);
return v;
}

@ -74,7 +74,7 @@ public class ViewCollectionActivity extends AppCompatActivity implements Refresh
}
info = journalEntity.getInfo();
isOwner = account.name.equals(journalEntity.getOwner());
isOwner = (journalEntity.getOwner() == null) || journalEntity.getOwner().equals(account.name);
final View colorSquare = findViewById(R.id.color);
if (info.type == CollectionInfo.Type.CALENDAR) {

Loading…
Cancel
Save