Page MenuHomePhorge

AvatarAdapter.qml
No OneTemporary

Size
830 B
Referenced Files
None
Subscribers
None

AvatarAdapter.qml

/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import QtQuick 2.15
import org.kde.kirigamiaddons.components 1.0 as KAC
import '.' as Kazv
KAC.Avatar {
id: avatar
property string mxcUri
readonly property var manager: kazvIOManager
readonly property var sdk: matrixSdk
source: fileHandler?.localFile || ''
property var fileHandlerComp: Component {
Kazv.FileHandler {
autoCache: true
kazvIOManager: avatar.manager
matrixSdk: avatar.sdk
}
}
property var fileHandler: null
onMxcUriChanged: {
if (fileHandler) {
fileHandler.destroy();
fileHandler = null;
}
fileHandler = fileHandlerComp.createObject(avatar, {
eventContent: ({ url: avatar.mxcUri }),
});
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 4:37 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41601
Default Alt Text
AvatarAdapter.qml (830 B)

Event Timeline