修复了自己引用页面出问题的bug,修复了单人导出时头像路径错误

This commit is contained in:
STDquantum 2023-12-17 19:37:16 +08:00
parent 45d406fcdc
commit aed1de2c4b

View File

@ -187,7 +187,7 @@ class ChildThread(QThread):
if is_chatroom:
avatar = f"./avatar/{message[12].wxid}.png"
else:
avatar = "./avatar/" + ('myhead.png' if is_send else 'tahead.png')
avatar = f"./avatar/{MePC().wxid if is_send else self.contact.wxid}.png"
if is_chatroom:
if is_send:
displayname = MePC().name
@ -227,7 +227,7 @@ class ChildThread(QThread):
if is_chatroom:
avatar = f"./avatar/{message[12].wxid}.png"
else:
avatar = "./avatar/" + ('myhead.png' if is_send else 'tahead.png')
avatar = f"./avatar/{MePC().wxid if is_send else self.contact.wxid}.png"
if is_chatroom:
if is_send:
displayname = MePC().name
@ -278,7 +278,7 @@ class ChildThread(QThread):
if is_chatroom:
avatar = f"./avatar/{message[12].wxid}.png"
else:
avatar = "./avatar/" + ('myhead.png' if is_send else 'tahead.png')
avatar = f"./avatar/{MePC().wxid if is_send else self.contact.wxid}.png"
if is_chatroom:
if is_send:
displayname = MePC().name
@ -320,7 +320,7 @@ class ChildThread(QThread):
if is_chatroom:
avatar = f"./avatar/{message[12].wxid}.png"
else:
avatar = "./avatar/" + ('myhead.png' if is_send else 'tahead.png')
avatar = f"./avatar/{MePC().wxid if is_send else self.contact.wxid}.png"
if is_chatroom:
if is_send:
displayname = MePC().name
@ -374,7 +374,7 @@ class ChildThread(QThread):
if is_chatroom:
avatar = f"./avatar/{message[12].wxid}.png"
else:
avatar = "./avatar/" + ('myhead.png' if is_send else 'tahead.png')
avatar = f"./avatar/{MePC().wxid if is_send else self.contact.wxid}.png"
if is_chatroom:
if is_send:
displayname = MePC().name
@ -442,7 +442,7 @@ class ChildThread(QThread):
if is_chatroom:
avatar = f"./avatar/{message[12].wxid}.png"
else:
avatar = "./avatar/" + ('myhead.png' if is_send else 'tahead.png')
avatar = f"./avatar/{MePC().wxid if is_send else self.contact.wxid}.png"
if is_chatroom:
if is_send:
displayname = MePC().name
@ -801,7 +801,7 @@ body{
word-break:normal;
}
.chat-refer-right {
margin-right: 55px;
margin-right: 15px;
}
.chat-refer-left{
margin-left: 15px;
@ -867,9 +867,16 @@ body{
.content-wrapper {
display: flex;
flex-direction: column;
}
.content-wrapper-left {
align-items: baseline;
}
.content-wrapper-right {
align-items: flex-end;
}
.displayname {
margin-left: 13px;
margin-left: 13px;
@ -1133,7 +1140,7 @@ html_end = '''
const side = message.is_send ? "right" : "left";
if (message.type == 1) {
// displayname bubble
messageContent.className = "content-wrapper";
messageContent.className = `content-wrapper content-wrapper-${side}`;
if (message.is_chatroom && !message.is_send) {
messageContent.appendChild(displayNameBox(message));
}
@ -1150,7 +1157,7 @@ html_end = '''
}
else if (message.type == 3) {
// displayname img
messageContent.className = "content-wrapper";
messageContent.className = `content-wrapper content-wrapper-${side}`;
if (message.is_chatroom && !message.is_send) {
messageContent.appendChild(displayNameBox(message));
}
@ -1163,7 +1170,7 @@ html_end = '''
}
else if (message.type == 43) {
// displayname video
messageContent.className = "content-wrapper";
messageContent.className = `content-wrapper content-wrapper-${side}`;
if (message.is_chatroom && !message.is_send) {
messageContent.appendChild(displayNameBox(message));
}
@ -1177,7 +1184,7 @@ html_end = '''
else if (message.type == 49) {
if (message.sub_type == 57) {
// displayname bubble refer
messageContent.className = "content-wrapper";
messageContent.className = `content-wrapper content-wrapper-${side}`;
if (message.is_chatroom && !message.is_send) {
messageContent.appendChild(displayNameBox(message));
}
@ -1194,7 +1201,7 @@ html_end = '''
}
else if (message.type == 34) {
// displayname 转的文字 audio
messageContent.className = "content-wrapper";
messageContent.className = `content-wrapper content-wrapper-${side}`;
if (message.is_chatroom && !message.is_send) {
messageContent.appendChild(displayNameBox(message));
}