Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 3de86577 authored by Mario Danic's avatar Mario Danic Committed by AndyScherzinger
Browse files

Fix the damn thing

parent 2af5e4fd
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -153,7 +153,8 @@ public class GetRemoteUserInfoOperation extends RemoteOperation {
                    userInfo.setDisplayName(respData.getString(NODE_DISPLAY_NAME_ALT));
                }

                if (respData.getString(NODE_EMAIL) != null && !TextUtils.isEmpty(respData.getString(NODE_EMAIL))) {
                if (respData.has(NODE_EMAIL) && !respData.isNull(NODE_EMAIL) &&
                        !TextUtils.isEmpty(respData.getString(NODE_EMAIL))) {
                    userInfo.setEmail(respData.getString(NODE_EMAIL));
                }

@@ -174,19 +175,23 @@ public class GetRemoteUserInfoOperation extends RemoteOperation {
                userInfo.setQuota(new Quota(quotaFree, quotaUsed, quotaTotal, quotaRelative, quotaValue));

                if (versionWithSelfAPI) {
                    if (respData.has(NODE_PHONE) && !TextUtils.isEmpty(respData.getString(NODE_PHONE))) {
                    if (respData.has(NODE_PHONE) && !respData.isNull(NODE_PHONE) &&
                            !TextUtils.isEmpty(respData.getString(NODE_PHONE))) {
                        userInfo.setPhone(respData.getString(NODE_PHONE));
                    }

                    if (respData.has(NODE_ADDRESS) && !TextUtils.isEmpty(respData.getString(NODE_ADDRESS))) {
                    if (respData.has(NODE_ADDRESS) && !respData.isNull(NODE_ADDRESS) &&
                            !TextUtils.isEmpty(respData.getString(NODE_ADDRESS))) {
                        userInfo.setAddress(respData.getString(NODE_ADDRESS));
                    }

                    if (respData.has(NODE_WEBPAGE) && !TextUtils.isEmpty(respData.getString(NODE_WEBPAGE))) {
                    if (respData.has(NODE_WEBPAGE) && !respData.isNull(NODE_WEBPAGE) &&
                            !TextUtils.isEmpty(respData.getString(NODE_WEBPAGE))) {
                        userInfo.setWebpage(respData.getString(NODE_WEBPAGE));
                    }

                    if (respData.has(NODE_TWITTER) && !TextUtils.isEmpty(respData.getString(NODE_TWITTER))) {
                    if (respData.has(NODE_TWITTER) && !respData.isNull(NODE_TWITTER) &&
                            !TextUtils.isEmpty(respData.getString(NODE_TWITTER))) {
                        userInfo.setTwitter(respData.getString(NODE_TWITTER));
                    }
                }