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:
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…
Reference in New Issue
Block a user