allow away and back to be collapsed

This means we also apply the collapsing to normal queries,
which might also collapse other things like joins / quits
which may be undesired by some

Fixes: https://github.com/thelounge/thelounge/issues/4583
This commit is contained in:
Reto Brunner 2022-12-29 16:06:54 +01:00
parent 8b1a4f72fa
commit e597e75847
3 changed files with 24 additions and 2 deletions

View File

@ -118,6 +118,18 @@ export default defineComponent({
(obj[type] > 1 ? " modes were set" : " mode was set") (obj[type] > 1 ? " modes were set" : " mode was set")
); );
break; break;
case "away":
strings.push(
"marked away " +
(obj[type] > 1 ? String(obj[type]) + " times" : "once")
);
break;
case "back":
strings.push(
"marked back " +
(obj[type] > 1 ? String(obj[type]) + " times" : "once")
);
break;
} }
} }
}); });

View File

@ -177,7 +177,7 @@ export default defineComponent({
}); });
const condensedMessages = computed(() => { const condensedMessages = computed(() => {
if (props.channel.type !== "channel") { if (props.channel.type !== "channel" && props.channel.type !== "query") {
return props.channel.messages; return props.channel.messages;
} }

View File

@ -17,7 +17,17 @@ const colorCodeMap = [
["15", "Light Grey"], ["15", "Light Grey"],
]; ];
const condensedTypes = new Set(["chghost", "join", "part", "quit", "nick", "kick", "mode"]); const condensedTypes = new Set([
"away",
"back",
"chghost",
"join",
"kick",
"mode",
"nick",
"part",
"quit",
]);
const timeFormats = { const timeFormats = {
msgDefault: "HH:mm", msgDefault: "HH:mm",