diff --git a/src/discord/ProfileCache.cpp b/src/discord/ProfileCache.cpp index 5325734..ee128e9 100644 --- a/src/discord/ProfileCache.cpp +++ b/src/discord/ProfileCache.cpp @@ -58,13 +58,11 @@ Profile* ProfileCache::LoadProfile(Snowflake user, nlohmann::json& jx) if (iter != m_processingRequests.end()) m_processingRequests.erase(iter); - auto& userData = jx; - if (userData.contains("user")) - userData = jx["user"]; + auto& userData = jx.contains("user") ? jx["user"] : jx; pf->m_snowflake = user; pf->m_name = GetUsername(userData); - pf->m_discrim = userData.contains("discriminator") ? int(GetIntFromString(jx["discriminator"])) : 0; + pf->m_discrim = userData.contains("discriminator") ? int(GetIntFromString(userData["discriminator"])) : 0; pf->m_globalName = GetGlobalName(userData); pf->m_bIsBot = GetFieldSafeBool(userData, "bot", false); pf->m_bUsingDefaultData = false; diff --git a/src/windows/ProfilePopout.cpp b/src/windows/ProfilePopout.cpp index e4a8f0c..fc3c0f8 100644 --- a/src/windows/ProfilePopout.cpp +++ b/src/windows/ProfilePopout.cpp @@ -92,7 +92,7 @@ bool ProfilePopout::Layout(HWND hWnd, SIZE& fullSize) DrawText(hdc, userName, -1, &rcUserName, singleLineFlags); rcPronouns = rcMeasureTemplate; - rcPronouns.right = ScaleByDPI(100); // Max width for pronouns, if exists + rcPronouns.right = ScaleByDPI(70); // Max width for pronouns, if exists DrawText2(hdc, pronouns, -1, &rcPronouns, singleLineFlags); rcStatus = rcMeasureTemplate;