mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
Try to fix another crash
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
ef6aad5093
commit
d4cee009cf
@ -62,15 +62,17 @@ public interface User extends Parcelable, Persistable, Serializable {
|
|||||||
boolean getScheduledForDeletion();
|
boolean getScheduledForDeletion();
|
||||||
|
|
||||||
default boolean hasSpreedCapabilityWithName(String capabilityName) {
|
default boolean hasSpreedCapabilityWithName(String capabilityName) {
|
||||||
try {
|
if (getCapabilities() != null) {
|
||||||
Capabilities capabilities = LoganSquare.parse(this.getCapabilities(), Capabilities.class);
|
try {
|
||||||
if (capabilities.getSpreedCapability() != null && capabilities.getSpreedCapability().getFeatures() != null) {
|
Capabilities capabilities = LoganSquare.parse(getCapabilities(), Capabilities.class);
|
||||||
return capabilities.getSpreedCapability().getFeatures().contains(capabilityName);
|
if (capabilities.getSpreedCapability() != null && capabilities.getSpreedCapability().getFeatures() != null) {
|
||||||
|
return capabilities.getSpreedCapability().getFeatures().contains(capabilityName);
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log.e(TAG, "Failed to get capabilities for the user");
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
|
||||||
Log.e(TAG, "Failed to get capabilities for the user");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user