Skip to content

Commit

Permalink
Current version of Psi+ is 1.5.2013
Browse files Browse the repository at this point in the history
It is based on:
* psi: c0cd337c
* plugins: 7a65467
* psimedia: 478567e
* resources: e32ef4b
  • Loading branch information
tehnick committed Jun 30, 2024
1 parent d90499a commit 155f218
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/chatviewcommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ ChatViewCommon::updateReactions(const QString &senderNickname, const QString &me
msgIt.value().total[v].append(senderNickname);
}
for (auto const &v : toRemove) {
msgIt.value().total[v].removeOne(senderNickname);
auto it = msgIt.value().total.find(v);
it->removeOne(senderNickname);
if (it->isEmpty()) {
msgIt.value().total.erase(it);
}
}
auto &total = msgIt.value().total;

Expand Down
19 changes: 14 additions & 5 deletions themes/chatview/psi/bubble/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@

function setupContextMenu() {
chatMenu.addItemProvider((event) => {
const isNick = event.target.className == "nick";
const isNick = event.target.classList.contains("nick");
let msgNode;
if (!isNick) {
msgNode = event.target;
Expand All @@ -126,10 +126,14 @@
let items;
if (isNick) {
items = [
{ text: "Info", action: ()=>{ shared.session.showInfo(nick); } },
{ text: "Open Chat", action: ()=>{ shared.session.openChat(nick); } },
{ text: "Kick", action: ()=>{ shared.session.kick(nick); } }
]
{ text: "Info", action: ()=>{ shared.session.showInfo(nick); } }
];
if (shared.isMuc) {
items = items.concat([
{ text: "Open Chat", action: ()=>{ shared.session.openChat(nick); } },
{ text: "Kick", action: ()=>{ shared.session.kick(nick); } }
])
}
} else {
items = [
{ text: "Delete", action: ()=>{ shared.session.deleteMessage(msgNode.id); } },
Expand All @@ -152,6 +156,11 @@
}
let reactions = msg.getElementsByClassName("reactions").item(0);
if (reactions) {
if (!event["reactions"].length) {
reactions.parentElement.removeChild(reactions.previousSibling);
reactions.parentElement.removeChild(reactions);
return;
}
reactions.innerHTML = "";
} else {
lineBreak = document.createElement("hr");
Expand Down
4 changes: 3 additions & 1 deletion themes/chatview/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,15 @@ function initPsiTheme() {
"🀣",
"πŸ”₯",
"πŸ‘",
"πŸ€”",
"😱",
"😭",
"πŸ™",
"❀️",
"😘",
"πŸ₯°",
"😍",
"😊",
"😊"
]

const rs = document.createElement("div");
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.2012 (2024-06-30, 57b93350)
1.5.2013 (2024-06-30, c0cd337c)

0 comments on commit 155f218

Please sign in to comment.