Skip to content
Snippets Groups Projects
Commit 77fa71aa authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Show room topic change

parent 13028f26
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,10 @@ Item {
height: textItem.contentHeight
Text {
id: textItem
text: qsTr("Changed topic")
text: qsTr("Changed topic to: ") + "\n" + modelData.Body
color: Theme.secondaryColor
wrapMode: Text.Wrap
width: chatView.width
}
}
......@@ -24,6 +24,7 @@ template <class T> std::string eventBody(const Event<T> &) { return ""; }
template <class T> auto eventBody(const mtx::events::RoomEvent<T> &e) -> decltype(e.content.body) {
return e.content.body;
}
std::string eventBody(const StateEvent<state::Topic> &e) { return e.content.topic; }
std::string eventBody(const StateEvent<state::Name> &e) { return e.content.name; }
std::string eventBody(const StateEvent<state::Member> &e) {
switch (e.content.membership) {
......
......@@ -33,6 +33,13 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatPage</name>
<message>
<source>Enter your message</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CoverPage</name>
<message>
......@@ -176,7 +183,7 @@
<context>
<name>Topic</name>
<message>
<source>Changed topic</source>
<source>Changed topic to: </source>
<translation type="unfinished"></translation>
</message>
</context>
......
......@@ -33,6 +33,13 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatPage</name>
<message>
<source>Enter your message</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CoverPage</name>
<message>
......@@ -154,29 +161,29 @@
<name>Room</name>
<message>
<source>member_invited: %1 %2</source>
<translation type="finished">%2 (%1) was invited.</translation>
<translation>%2 (%1) was invited.</translation>
</message>
<message>
<source>member_banned: %1 %2</source>
<translation type="finished">%2 (%1) was banned.</translation>
<translation>%2 (%1) was banned.</translation>
</message>
<message>
<source>member_left: %1 %2</source>
<translation type="finished">%1 has left.</translation>
<translation>%1 has left.</translation>
</message>
<message>
<source>member_knocked: %1 %2</source>
<translation type="finished">%2 (%1) wants to join this room.</translation>
<translation>%2 (%1) wants to join this room.</translation>
</message>
<message>
<source>member_joined: %1 %2</source>
<translation type="finished">%2 (%1) joined.</translation>
<translation>%2 (%1) joined.</translation>
</message>
</context>
<context>
<name>Topic</name>
<message>
<source>Changed topic</source>
<source>Changed topic to: </source>
<translation type="unfinished"></translation>
</message>
</context>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment