Fix refresh avatar image after change it

This commit is contained in:
Angela Mazzurco 2017-07-26 14:26:46 +02:00
parent 040a358d69
commit 77c6db2155
3 changed files with 16 additions and 1 deletions

View File

@ -133,6 +133,14 @@ QtObject
} }
return "" return ""
} }
function delIdentityAvatar (gxsId)
{
if (identityDetails[gxsId] && identityDetails[gxsId].avatar !== undefined)
{
identityDetails[gxsId].avatar = ""
}
}
} }

View File

@ -65,7 +65,7 @@ Item
if (jP.returncode === "ok") if (jP.returncode === "ok")
{ {
console.log("Avatar changed! ") console.log("Avatar changed! ")
topFace.getDetails() topFace.refresh()
} }
}) })
} }

View File

@ -105,6 +105,13 @@ Item
} }
} }
function refresh()
{
ChatCache.contactsCache.delIdentityAvatar(gxs_id)
compRoot.avatarAttemptCnt = 0
getDetails()
}
Component.onCompleted: startComponent () Component.onCompleted: startComponent ()