forked from blue/squawk
some more methods for archive to store avatar states
This commit is contained in:
parent
323a549eca
commit
c678a790e5
6 changed files with 168 additions and 55 deletions
|
@ -20,9 +20,10 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
Core::RosterItem::RosterItem(const QString& pJid, const QString& account, QObject* parent):
|
||||
Core::RosterItem::RosterItem(const QString& pJid, const QString& pAccount, QObject* parent):
|
||||
QObject(parent),
|
||||
jid(pJid),
|
||||
account(pAccount),
|
||||
name(),
|
||||
archiveState(empty),
|
||||
archive(new Archive(jid)),
|
||||
|
@ -331,3 +332,15 @@ bool Core::RosterItem::isMuc() const
|
|||
{
|
||||
return muc;
|
||||
}
|
||||
|
||||
QString Core::RosterItem::avatarHash() const
|
||||
{
|
||||
return archive->getAvatarHash();
|
||||
}
|
||||
|
||||
QString Core::RosterItem::avatarPath() const
|
||||
{
|
||||
QString path(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
|
||||
path += "/" + account + "/" + jid + "/avatar." + archive->getAvatarType();
|
||||
return path;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue