mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix jdenticons in various places
This commit is contained in:
parent
356723fe06
commit
17729ce662
7 changed files with 23 additions and 10 deletions
|
@ -61,6 +61,7 @@ ApplicationWindow {
|
||||||
header: AvatarListTile {
|
header: AvatarListTile {
|
||||||
title: imagePack.packname
|
title: imagePack.packname
|
||||||
avatarUrl: imagePack.avatarUrl
|
avatarUrl: imagePack.avatarUrl
|
||||||
|
userid: imagePack.packname
|
||||||
subtitle: imagePack.statekey
|
subtitle: imagePack.statekey
|
||||||
index: -1
|
index: -1
|
||||||
selectedIndex: currentImageIndex
|
selectedIndex: currentImageIndex
|
||||||
|
@ -111,7 +112,6 @@ ApplicationWindow {
|
||||||
title: shortCode
|
title: shortCode
|
||||||
subtitle: body
|
subtitle: body
|
||||||
avatarUrl: url
|
avatarUrl: url
|
||||||
roomid: imagePack.roomid
|
|
||||||
selectedIndex: currentImageIndex
|
selectedIndex: currentImageIndex
|
||||||
crop: false
|
crop: false
|
||||||
|
|
||||||
|
@ -143,6 +143,7 @@ ApplicationWindow {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
url: imagePack.avatarUrl.replace("mxc://", "image://MxcImage/")
|
url: imagePack.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||||
displayName: imagePack.packname
|
displayName: imagePack.packname
|
||||||
|
userid: imagePack.packname
|
||||||
height: 130
|
height: 130
|
||||||
width: 130
|
width: 130
|
||||||
crop: false
|
crop: false
|
||||||
|
@ -220,6 +221,7 @@ ApplicationWindow {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
url: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.Url).replace("mxc://", "image://MxcImage/")
|
url: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.Url).replace("mxc://", "image://MxcImage/")
|
||||||
displayName: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.ShortCode)
|
displayName: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.ShortCode)
|
||||||
|
userid: displayName
|
||||||
height: 130
|
height: 130
|
||||||
width: 130
|
width: 130
|
||||||
crop: false
|
crop: false
|
||||||
|
|
|
@ -112,7 +112,7 @@ ApplicationWindow {
|
||||||
return qsTr("Globally enabled pack");
|
return qsTr("Globally enabled pack");
|
||||||
}
|
}
|
||||||
selectedIndex: currentPackIndex
|
selectedIndex: currentPackIndex
|
||||||
roomid: currentPack.roomid
|
userid: displayName
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onSingleTapped: currentPackIndex = index
|
onSingleTapped: currentPackIndex = index
|
||||||
|
@ -144,6 +144,7 @@ ApplicationWindow {
|
||||||
Avatar {
|
Avatar {
|
||||||
url: packinfo.avatarUrl.replace("mxc://", "image://MxcImage/")
|
url: packinfo.avatarUrl.replace("mxc://", "image://MxcImage/")
|
||||||
displayName: packinfo.packName
|
displayName: packinfo.packName
|
||||||
|
userid: packinfo.packName
|
||||||
height: 100
|
height: 100
|
||||||
width: 100
|
width: 100
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
|
@ -34,15 +34,15 @@ Rectangle {
|
||||||
width: Nheko.avatarSize
|
width: Nheko.avatarSize
|
||||||
height: Nheko.avatarSize
|
height: Nheko.avatarSize
|
||||||
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
||||||
displayName: CallManager.callParty
|
|
||||||
userid: CallManager.callParty
|
userid: CallManager.callParty
|
||||||
|
displayName: CallManager.callPartyDisplayName
|
||||||
onClicked: TimelineManager.openImageOverlay(room.avatarUrl(userid), room.data.eventId)
|
onClicked: TimelineManager.openImageOverlay(room.avatarUrl(userid), room.data.eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.leftMargin: 8
|
Layout.leftMargin: 8
|
||||||
font.pointSize: fontMetrics.font.pointSize * 1.1
|
font.pointSize: fontMetrics.font.pointSize * 1.1
|
||||||
text: CallManager.callParty
|
text: CallManager.callPartyDisplayName
|
||||||
color: "#000000"
|
color: "#000000"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ Popup {
|
||||||
Label {
|
Label {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.topMargin: msgView.height / 25
|
Layout.topMargin: msgView.height / 25
|
||||||
text: CallManager.callParty
|
text: CallManager.callPartyDisplayName
|
||||||
font.pointSize: fontMetrics.font.pointSize * 2
|
font.pointSize: fontMetrics.font.pointSize * 2
|
||||||
color: Nheko.colors.windowText
|
color: Nheko.colors.windowText
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,8 @@ Popup {
|
||||||
width: msgView.height / 5
|
width: msgView.height / 5
|
||||||
height: msgView.height / 5
|
height: msgView.height / 5
|
||||||
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
||||||
displayName: CallManager.callParty
|
userid: CallManager.callParty
|
||||||
|
displayName: CallManager.callPartyDisplayName
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
|
@ -41,14 +41,15 @@ Rectangle {
|
||||||
width: Nheko.avatarSize
|
width: Nheko.avatarSize
|
||||||
height: Nheko.avatarSize
|
height: Nheko.avatarSize
|
||||||
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
url: CallManager.callPartyAvatarUrl.replace("mxc://", "image://MxcImage/")
|
||||||
displayName: CallManager.callParty
|
userid: CallManager.callParty
|
||||||
|
displayName: CallManager.callPartyDisplayName
|
||||||
onClicked: TimelineManager.openImageOverlay(room.avatarUrl(userid), room.data.eventId)
|
onClicked: TimelineManager.openImageOverlay(room.avatarUrl(userid), room.data.eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.leftMargin: 8
|
Layout.leftMargin: 8
|
||||||
font.pointSize: fontMetrics.font.pointSize * 1.1
|
font.pointSize: fontMetrics.font.pointSize * 1.1
|
||||||
text: CallManager.callParty
|
text: CallManager.callPartyDisplayName
|
||||||
color: "#000000"
|
color: "#000000"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,9 @@ CallManager::sendInvite(const QString &roomid, CallType callType, unsigned int w
|
||||||
std::vector<RoomMember> members(cache::getMembers(roomid.toStdString()));
|
std::vector<RoomMember> members(cache::getMembers(roomid.toStdString()));
|
||||||
const RoomMember &callee =
|
const RoomMember &callee =
|
||||||
members.front().user_id == utils::localUser() ? members.back() : members.front();
|
members.front().user_id == utils::localUser() ? members.back() : members.front();
|
||||||
callParty_ = callee.display_name.isEmpty() ? callee.user_id : callee.display_name;
|
callParty_ = callee.user_id;
|
||||||
|
callPartyDisplayName_ =
|
||||||
|
callee.display_name.isEmpty() ? callee.user_id : callee.display_name;
|
||||||
callPartyAvatarUrl_ = QString::fromStdString(roomInfo.avatar_url);
|
callPartyAvatarUrl_ = QString::fromStdString(roomInfo.avatar_url);
|
||||||
emit newInviteState();
|
emit newInviteState();
|
||||||
playRingtone(QUrl("qrc:/media/media/ringback.ogg"), true);
|
playRingtone(QUrl("qrc:/media/media/ringback.ogg"), true);
|
||||||
|
@ -308,7 +310,9 @@ CallManager::handleEvent(const RoomEvent<CallInvite> &callInviteEvent)
|
||||||
std::vector<RoomMember> members(cache::getMembers(callInviteEvent.room_id));
|
std::vector<RoomMember> members(cache::getMembers(callInviteEvent.room_id));
|
||||||
const RoomMember &caller =
|
const RoomMember &caller =
|
||||||
members.front().user_id == utils::localUser() ? members.back() : members.front();
|
members.front().user_id == utils::localUser() ? members.back() : members.front();
|
||||||
callParty_ = caller.display_name.isEmpty() ? caller.user_id : caller.display_name;
|
callParty_ = caller.user_id;
|
||||||
|
callPartyDisplayName_ =
|
||||||
|
caller.display_name.isEmpty() ? caller.user_id : caller.display_name;
|
||||||
callPartyAvatarUrl_ = QString::fromStdString(roomInfo.avatar_url);
|
callPartyAvatarUrl_ = QString::fromStdString(roomInfo.avatar_url);
|
||||||
|
|
||||||
haveCallInvite_ = true;
|
haveCallInvite_ = true;
|
||||||
|
@ -459,6 +463,7 @@ CallManager::clear()
|
||||||
{
|
{
|
||||||
roomid_.clear();
|
roomid_.clear();
|
||||||
callParty_.clear();
|
callParty_.clear();
|
||||||
|
callPartyDisplayName_.clear();
|
||||||
callPartyAvatarUrl_.clear();
|
callPartyAvatarUrl_.clear();
|
||||||
callid_.clear();
|
callid_.clear();
|
||||||
callType_ = CallType::VOICE;
|
callType_ = CallType::VOICE;
|
||||||
|
|
|
@ -32,6 +32,7 @@ class CallManager : public QObject
|
||||||
Q_PROPERTY(webrtc::CallType callType READ callType NOTIFY newInviteState)
|
Q_PROPERTY(webrtc::CallType callType READ callType NOTIFY newInviteState)
|
||||||
Q_PROPERTY(webrtc::State callState READ callState NOTIFY newCallState)
|
Q_PROPERTY(webrtc::State callState READ callState NOTIFY newCallState)
|
||||||
Q_PROPERTY(QString callParty READ callParty NOTIFY newInviteState)
|
Q_PROPERTY(QString callParty READ callParty NOTIFY newInviteState)
|
||||||
|
Q_PROPERTY(QString callPartyDisplayName READ callPartyDisplayName NOTIFY newInviteState)
|
||||||
Q_PROPERTY(QString callPartyAvatarUrl READ callPartyAvatarUrl NOTIFY newInviteState)
|
Q_PROPERTY(QString callPartyAvatarUrl READ callPartyAvatarUrl NOTIFY newInviteState)
|
||||||
Q_PROPERTY(bool isMicMuted READ isMicMuted NOTIFY micMuteChanged)
|
Q_PROPERTY(bool isMicMuted READ isMicMuted NOTIFY micMuteChanged)
|
||||||
Q_PROPERTY(bool haveLocalPiP READ haveLocalPiP NOTIFY newCallState)
|
Q_PROPERTY(bool haveLocalPiP READ haveLocalPiP NOTIFY newCallState)
|
||||||
|
@ -48,6 +49,7 @@ public:
|
||||||
webrtc::CallType callType() const { return callType_; }
|
webrtc::CallType callType() const { return callType_; }
|
||||||
webrtc::State callState() const { return session_.state(); }
|
webrtc::State callState() const { return session_.state(); }
|
||||||
QString callParty() const { return callParty_; }
|
QString callParty() const { return callParty_; }
|
||||||
|
QString callPartyDisplayName() const { return callPartyDisplayName_; }
|
||||||
QString callPartyAvatarUrl() const { return callPartyAvatarUrl_; }
|
QString callPartyAvatarUrl() const { return callPartyAvatarUrl_; }
|
||||||
bool isMicMuted() const { return session_.isMicMuted(); }
|
bool isMicMuted() const { return session_.isMicMuted(); }
|
||||||
bool haveLocalPiP() const { return session_.haveLocalPiP(); }
|
bool haveLocalPiP() const { return session_.haveLocalPiP(); }
|
||||||
|
@ -87,6 +89,7 @@ private:
|
||||||
WebRTCSession &session_;
|
WebRTCSession &session_;
|
||||||
QString roomid_;
|
QString roomid_;
|
||||||
QString callParty_;
|
QString callParty_;
|
||||||
|
QString callPartyDisplayName_;
|
||||||
QString callPartyAvatarUrl_;
|
QString callPartyAvatarUrl_;
|
||||||
std::string callid_;
|
std::string callid_;
|
||||||
const uint32_t timeoutms_ = 120000;
|
const uint32_t timeoutms_ = 120000;
|
||||||
|
|
Loading…
Reference in a new issue