1
0
mirror of https://github.com/etesync/android synced 2024-11-16 04:49:06 +00:00

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

This commit is contained in:
Tom Hacohen 2017-04-21 20:46:17 +01:00
parent 201e4e09eb
commit fab8aa90ac
2 changed files with 3 additions and 2 deletions

View File

@ -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;
}

View File

@ -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) {