kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix NPE in conversation update group info.
rodzic
be21b9e163
commit
782a1ce301
|
@ -316,10 +316,17 @@ public final class ConversationUpdateItem extends FrameLayout
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSelfAdmin() {
|
public boolean isSelfAdmin() {
|
||||||
|
if (liveIsSelfAdmin == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return liveIsSelfAdmin.getValue() != null ? liveIsSelfAdmin.getValue() : false;
|
return liveIsSelfAdmin.getValue() != null ? liveIsSelfAdmin.getValue() : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBanned(Recipient recipient) {
|
public boolean isBanned(Recipient recipient) {
|
||||||
|
if (liveBannedMembers == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Set<UUID> bannedMembers = liveBannedMembers.getValue();
|
Set<UUID> bannedMembers = liveBannedMembers.getValue();
|
||||||
if (bannedMembers != null) {
|
if (bannedMembers != null) {
|
||||||
return recipient.getServiceId().isPresent() && bannedMembers.contains(recipient.requireServiceId().uuid());
|
return recipient.getServiceId().isPresent() && bannedMembers.contains(recipient.requireServiceId().uuid());
|
||||||
|
@ -328,6 +335,10 @@ public final class ConversationUpdateItem extends FrameLayout
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFullMember(Recipient recipient) {
|
public boolean isFullMember(Recipient recipient) {
|
||||||
|
if (liveFullMembers == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Set<UUID> members = liveFullMembers.getValue();
|
Set<UUID> members = liveFullMembers.getValue();
|
||||||
if (members != null) {
|
if (members != null) {
|
||||||
return recipient.getServiceId().isPresent() && members.contains(recipient.requireServiceId().uuid());
|
return recipient.getServiceId().isPresent() && members.contains(recipient.requireServiceId().uuid());
|
||||||
|
|
Ładowanie…
Reference in New Issue