fix(userIcon): 在Account接口异常时显示默认用户头像

This commit is contained in:
hewenfei 2024-05-31 16:37:25 +08:00
parent 594d455a38
commit 09bcddf500
3 changed files with 2 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -2,5 +2,6 @@
<qresource prefix="/res"> <qresource prefix="/res">
<file>icon/application-x-desktop.png</file> <file>icon/application-x-desktop.png</file>
<file>icon/pad_mainpower.svg</file> <file>icon/pad_mainpower.svg</file>
<file>icon/default-community-image.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -52,7 +52,7 @@ QString SidebarButtonUtils::getRealName()
QString SidebarButtonUtils::getIconFile() QString SidebarButtonUtils::getIconFile()
{ {
if (m_currentUserInfo.iconFile.isEmpty()) { if (m_currentUserInfo.iconFile.isEmpty() || m_currentUserInfo.iconFile.endsWith("/.face")) {
return {DEFAULT_USER_ICON_FILE}; return {DEFAULT_USER_ICON_FILE};
} }