mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
Update mentions dialog
Mentions are now separated into 'this room' and 'all rooms' tab., which allows the user to filter on the current room if they desire. Should add additional logic in the future to show which room the mention was in the for the 'all rooms' view.
This commit is contained in:
parent
497774d623
commit
fd2d4d6db3
12 changed files with 271 additions and 105 deletions
|
@ -12,7 +12,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ChatPage</name>
|
<name>ChatPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/ChatPage.cpp" line="+331"/>
|
<location filename="../../src/ChatPage.cpp" line="+330"/>
|
||||||
<source>Failed to upload image. Please try again.</source>
|
<source>Failed to upload image. Please try again.</source>
|
||||||
<translation>Hochladen des Bildes fehlgeschlagen. Bitte versuche es erneut.</translation>
|
<translation>Hochladen des Bildes fehlgeschlagen. Bitte versuche es erneut.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -977,6 +977,19 @@ Medien-Größe: %2
|
||||||
<translation>Hochladen der Bilddatei fehlgeschlagen: %s</translation>
|
<translation>Hochladen der Bilddatei fehlgeschlagen: %s</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>dialogs::UserMentions</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialogs/UserMentions.cpp" line="+53"/>
|
||||||
|
<source>This Room</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+1"/>
|
||||||
|
<source>All Rooms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>dialogs::UserProfile</name>
|
<name>dialogs::UserProfile</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1056,32 +1069,32 @@ Medien-Größe: %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 an image</source>
|
<source>%1 an image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a file</source>
|
<source>%1 a file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a video clip</source>
|
<source>%1 a video clip</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a sticker</source>
|
<source>%1 a sticker</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a notification</source>
|
<source>%1 a notification</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
<location line="+7"/>
|
||||||
<source>%1 an encrypted message</source>
|
<source>%1 an encrypted message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1089,7 +1102,7 @@ Medien-Größe: %2
|
||||||
<context>
|
<context>
|
||||||
<name>message-description:</name>
|
<name>message-description:</name>
|
||||||
<message>
|
<message>
|
||||||
<location line="-19"/>
|
<location line="-26"/>
|
||||||
<source>sent</source>
|
<source>sent</source>
|
||||||
<comment>For when someone else is the sender</comment>
|
<comment>For when someone else is the sender</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1108,7 +1121,7 @@ Medien-Größe: %2
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Utils.cpp" line="+46"/>
|
<location filename="../../src/Utils.cpp" line="+46"/>
|
||||||
<location filename="../../src/Utils.h" line="+47"/>
|
<location filename="../../src/Utils.h" line="+55"/>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Du</translation>
|
<translation>Du</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ChatPage</name>
|
<name>ChatPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/ChatPage.cpp" line="+331"/>
|
<location filename="../../src/ChatPage.cpp" line="+330"/>
|
||||||
<source>Failed to upload image. Please try again.</source>
|
<source>Failed to upload image. Please try again.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -975,6 +975,19 @@ Media size: %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>dialogs::UserMentions</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialogs/UserMentions.cpp" line="+53"/>
|
||||||
|
<source>This Room</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+1"/>
|
||||||
|
<source>All Rooms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>dialogs::UserProfile</name>
|
<name>dialogs::UserProfile</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1054,32 +1067,32 @@ Media size: %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 an image</source>
|
<source>%1 an image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a file</source>
|
<source>%1 a file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a video clip</source>
|
<source>%1 a video clip</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a sticker</source>
|
<source>%1 a sticker</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a notification</source>
|
<source>%1 a notification</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
<location line="+7"/>
|
||||||
<source>%1 an encrypted message</source>
|
<source>%1 an encrypted message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1087,7 +1100,7 @@ Media size: %2
|
||||||
<context>
|
<context>
|
||||||
<name>message-description:</name>
|
<name>message-description:</name>
|
||||||
<message>
|
<message>
|
||||||
<location line="-19"/>
|
<location line="-26"/>
|
||||||
<source>sent</source>
|
<source>sent</source>
|
||||||
<comment>For when someone else is the sender</comment>
|
<comment>For when someone else is the sender</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1106,7 +1119,7 @@ Media size: %2
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Utils.cpp" line="+46"/>
|
<location filename="../../src/Utils.cpp" line="+46"/>
|
||||||
<location filename="../../src/Utils.h" line="+47"/>
|
<location filename="../../src/Utils.h" line="+55"/>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ChatPage</name>
|
<name>ChatPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/ChatPage.cpp" line="+331"/>
|
<location filename="../../src/ChatPage.cpp" line="+330"/>
|
||||||
<source>Failed to upload image. Please try again.</source>
|
<source>Failed to upload image. Please try again.</source>
|
||||||
<translation>Failed to upload image. Please try again.</translation>
|
<translation>Failed to upload image. Please try again.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -979,6 +979,19 @@ Media size: %2
|
||||||
<translation>Failed to upload image: %s</translation>
|
<translation>Failed to upload image: %s</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>dialogs::UserMentions</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialogs/UserMentions.cpp" line="+53"/>
|
||||||
|
<source>This Room</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+1"/>
|
||||||
|
<source>All Rooms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>dialogs::UserProfile</name>
|
<name>dialogs::UserProfile</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1058,32 +1071,32 @@ Media size: %2
|
||||||
<translation type="unfinished">%1 an audio clip</translation>
|
<translation type="unfinished">%1 an audio clip</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 an image</source>
|
<source>%1 an image</source>
|
||||||
<translation type="unfinished">%1 an image</translation>
|
<translation type="unfinished">%1 an image</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a file</source>
|
<source>%1 a file</source>
|
||||||
<translation type="unfinished">%1 a file</translation>
|
<translation type="unfinished">%1 a file</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a video clip</source>
|
<source>%1 a video clip</source>
|
||||||
<translation type="unfinished">%1 a video clip</translation>
|
<translation type="unfinished">%1 a video clip</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a sticker</source>
|
<source>%1 a sticker</source>
|
||||||
<translation type="unfinished">%1 a sticker</translation>
|
<translation type="unfinished">%1 a sticker</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a notification</source>
|
<source>%1 a notification</source>
|
||||||
<translation type="unfinished">%1 a notification</translation>
|
<translation type="unfinished">%1 a notification</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
<location line="+7"/>
|
||||||
<source>%1 an encrypted message</source>
|
<source>%1 an encrypted message</source>
|
||||||
<translation type="unfinished">%1 an encrypted message</translation>
|
<translation type="unfinished">%1 an encrypted message</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1091,7 +1104,7 @@ Media size: %2
|
||||||
<context>
|
<context>
|
||||||
<name>message-description:</name>
|
<name>message-description:</name>
|
||||||
<message>
|
<message>
|
||||||
<location line="-19"/>
|
<location line="-26"/>
|
||||||
<source>sent</source>
|
<source>sent</source>
|
||||||
<comment>For when someone else is the sender</comment>
|
<comment>For when someone else is the sender</comment>
|
||||||
<translation type="unfinished">sent</translation>
|
<translation type="unfinished">sent</translation>
|
||||||
|
@ -1110,7 +1123,7 @@ Media size: %2
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Utils.cpp" line="+46"/>
|
<location filename="../../src/Utils.cpp" line="+46"/>
|
||||||
<location filename="../../src/Utils.h" line="+47"/>
|
<location filename="../../src/Utils.h" line="+55"/>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>You</translation>
|
<translation>You</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ChatPage</name>
|
<name>ChatPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/ChatPage.cpp" line="+331"/>
|
<location filename="../../src/ChatPage.cpp" line="+330"/>
|
||||||
<source>Failed to upload image. Please try again.</source>
|
<source>Failed to upload image. Please try again.</source>
|
||||||
<translation>Kuvan lähettäminen epäonnistui. Ole hyvä ja yritä uudelleen.</translation>
|
<translation>Kuvan lähettäminen epäonnistui. Ole hyvä ja yritä uudelleen.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -979,6 +979,19 @@ Median koko: %2
|
||||||
<translation>Kuvan lähetys epäonnistui: %s</translation>
|
<translation>Kuvan lähetys epäonnistui: %s</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>dialogs::UserMentions</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialogs/UserMentions.cpp" line="+53"/>
|
||||||
|
<source>This Room</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+1"/>
|
||||||
|
<source>All Rooms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>dialogs::UserProfile</name>
|
<name>dialogs::UserProfile</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1058,32 +1071,32 @@ Median koko: %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 an image</source>
|
<source>%1 an image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a file</source>
|
<source>%1 a file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a video clip</source>
|
<source>%1 a video clip</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a sticker</source>
|
<source>%1 a sticker</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a notification</source>
|
<source>%1 a notification</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
<location line="+7"/>
|
||||||
<source>%1 an encrypted message</source>
|
<source>%1 an encrypted message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1091,7 +1104,7 @@ Median koko: %2
|
||||||
<context>
|
<context>
|
||||||
<name>message-description:</name>
|
<name>message-description:</name>
|
||||||
<message>
|
<message>
|
||||||
<location line="-19"/>
|
<location line="-26"/>
|
||||||
<source>sent</source>
|
<source>sent</source>
|
||||||
<comment>For when someone else is the sender</comment>
|
<comment>For when someone else is the sender</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1110,7 +1123,7 @@ Median koko: %2
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Utils.cpp" line="+46"/>
|
<location filename="../../src/Utils.cpp" line="+46"/>
|
||||||
<location filename="../../src/Utils.h" line="+47"/>
|
<location filename="../../src/Utils.h" line="+55"/>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation>Sinä</translation>
|
<translation>Sinä</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ChatPage</name>
|
<name>ChatPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/ChatPage.cpp" line="+331"/>
|
<location filename="../../src/ChatPage.cpp" line="+330"/>
|
||||||
<source>Failed to upload image. Please try again.</source>
|
<source>Failed to upload image. Please try again.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -978,6 +978,19 @@ Taille du média : %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>dialogs::UserMentions</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialogs/UserMentions.cpp" line="+53"/>
|
||||||
|
<source>This Room</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+1"/>
|
||||||
|
<source>All Rooms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>dialogs::UserProfile</name>
|
<name>dialogs::UserProfile</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1057,32 +1070,32 @@ Taille du média : %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 an image</source>
|
<source>%1 an image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a file</source>
|
<source>%1 a file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a video clip</source>
|
<source>%1 a video clip</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a sticker</source>
|
<source>%1 a sticker</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a notification</source>
|
<source>%1 a notification</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
<location line="+7"/>
|
||||||
<source>%1 an encrypted message</source>
|
<source>%1 an encrypted message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1090,7 +1103,7 @@ Taille du média : %2
|
||||||
<context>
|
<context>
|
||||||
<name>message-description:</name>
|
<name>message-description:</name>
|
||||||
<message>
|
<message>
|
||||||
<location line="-19"/>
|
<location line="-26"/>
|
||||||
<source>sent</source>
|
<source>sent</source>
|
||||||
<comment>For when someone else is the sender</comment>
|
<comment>For when someone else is the sender</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1109,7 +1122,7 @@ Taille du média : %2
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Utils.cpp" line="+46"/>
|
<location filename="../../src/Utils.cpp" line="+46"/>
|
||||||
<location filename="../../src/Utils.h" line="+47"/>
|
<location filename="../../src/Utils.h" line="+55"/>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ChatPage</name>
|
<name>ChatPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/ChatPage.cpp" line="+331"/>
|
<location filename="../../src/ChatPage.cpp" line="+330"/>
|
||||||
<source>Failed to upload image. Please try again.</source>
|
<source>Failed to upload image. Please try again.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -977,6 +977,19 @@ Mediagrootte: %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>dialogs::UserMentions</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialogs/UserMentions.cpp" line="+53"/>
|
||||||
|
<source>This Room</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+1"/>
|
||||||
|
<source>All Rooms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>dialogs::UserProfile</name>
|
<name>dialogs::UserProfile</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1056,32 +1069,32 @@ Mediagrootte: %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 an image</source>
|
<source>%1 an image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a file</source>
|
<source>%1 a file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a video clip</source>
|
<source>%1 a video clip</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a sticker</source>
|
<source>%1 a sticker</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a notification</source>
|
<source>%1 a notification</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
<location line="+7"/>
|
||||||
<source>%1 an encrypted message</source>
|
<source>%1 an encrypted message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1089,7 +1102,7 @@ Mediagrootte: %2
|
||||||
<context>
|
<context>
|
||||||
<name>message-description:</name>
|
<name>message-description:</name>
|
||||||
<message>
|
<message>
|
||||||
<location line="-19"/>
|
<location line="-26"/>
|
||||||
<source>sent</source>
|
<source>sent</source>
|
||||||
<comment>For when someone else is the sender</comment>
|
<comment>For when someone else is the sender</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1108,7 +1121,7 @@ Mediagrootte: %2
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Utils.cpp" line="+46"/>
|
<location filename="../../src/Utils.cpp" line="+46"/>
|
||||||
<location filename="../../src/Utils.h" line="+47"/>
|
<location filename="../../src/Utils.h" line="+55"/>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ChatPage</name>
|
<name>ChatPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/ChatPage.cpp" line="+331"/>
|
<location filename="../../src/ChatPage.cpp" line="+330"/>
|
||||||
<source>Failed to upload image. Please try again.</source>
|
<source>Failed to upload image. Please try again.</source>
|
||||||
<translation>Nie udało się wysłać obrazu. Spróbuj ponownie.</translation>
|
<translation>Nie udało się wysłać obrazu. Spróbuj ponownie.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -981,6 +981,19 @@ Rozmiar multimediów: %2
|
||||||
<translation>Nie udało się wysłać obrazu: %s</translation>
|
<translation>Nie udało się wysłać obrazu: %s</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>dialogs::UserMentions</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialogs/UserMentions.cpp" line="+53"/>
|
||||||
|
<source>This Room</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+1"/>
|
||||||
|
<source>All Rooms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>dialogs::UserProfile</name>
|
<name>dialogs::UserProfile</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1060,32 +1073,32 @@ Rozmiar multimediów: %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 an image</source>
|
<source>%1 an image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a file</source>
|
<source>%1 a file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a video clip</source>
|
<source>%1 a video clip</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a sticker</source>
|
<source>%1 a sticker</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a notification</source>
|
<source>%1 a notification</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
<location line="+7"/>
|
||||||
<source>%1 an encrypted message</source>
|
<source>%1 an encrypted message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1093,7 +1106,7 @@ Rozmiar multimediów: %2
|
||||||
<context>
|
<context>
|
||||||
<name>message-description:</name>
|
<name>message-description:</name>
|
||||||
<message>
|
<message>
|
||||||
<location line="-19"/>
|
<location line="-26"/>
|
||||||
<source>sent</source>
|
<source>sent</source>
|
||||||
<comment>For when someone else is the sender</comment>
|
<comment>For when someone else is the sender</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1112,7 +1125,7 @@ Rozmiar multimediów: %2
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Utils.cpp" line="+46"/>
|
<location filename="../../src/Utils.cpp" line="+46"/>
|
||||||
<location filename="../../src/Utils.h" line="+47"/>
|
<location filename="../../src/Utils.h" line="+55"/>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ChatPage</name>
|
<name>ChatPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/ChatPage.cpp" line="+331"/>
|
<location filename="../../src/ChatPage.cpp" line="+330"/>
|
||||||
<source>Failed to upload image. Please try again.</source>
|
<source>Failed to upload image. Please try again.</source>
|
||||||
<translation>Не удалось загрузить изображение. Пожалуйста, попробуйте еще раз.</translation>
|
<translation>Не удалось загрузить изображение. Пожалуйста, попробуйте еще раз.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -980,6 +980,19 @@ Media size: %2
|
||||||
<translation>Не удалось загрузить изображение: %s</translation>
|
<translation>Не удалось загрузить изображение: %s</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>dialogs::UserMentions</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialogs/UserMentions.cpp" line="+53"/>
|
||||||
|
<source>This Room</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+1"/>
|
||||||
|
<source>All Rooms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>dialogs::UserProfile</name>
|
<name>dialogs::UserProfile</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1059,32 +1072,32 @@ Media size: %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 an image</source>
|
<source>%1 an image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a file</source>
|
<source>%1 a file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a video clip</source>
|
<source>%1 a video clip</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a sticker</source>
|
<source>%1 a sticker</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a notification</source>
|
<source>%1 a notification</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
<location line="+7"/>
|
||||||
<source>%1 an encrypted message</source>
|
<source>%1 an encrypted message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1092,7 +1105,7 @@ Media size: %2
|
||||||
<context>
|
<context>
|
||||||
<name>message-description:</name>
|
<name>message-description:</name>
|
||||||
<message>
|
<message>
|
||||||
<location line="-19"/>
|
<location line="-26"/>
|
||||||
<source>sent</source>
|
<source>sent</source>
|
||||||
<comment>For when someone else is the sender</comment>
|
<comment>For when someone else is the sender</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1111,7 +1124,7 @@ Media size: %2
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Utils.cpp" line="+46"/>
|
<location filename="../../src/Utils.cpp" line="+46"/>
|
||||||
<location filename="../../src/Utils.h" line="+47"/>
|
<location filename="../../src/Utils.h" line="+55"/>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ChatPage</name>
|
<name>ChatPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/ChatPage.cpp" line="+331"/>
|
<location filename="../../src/ChatPage.cpp" line="+330"/>
|
||||||
<source>Failed to upload image. Please try again.</source>
|
<source>Failed to upload image. Please try again.</source>
|
||||||
<translation>上传图像失败。请重试。</translation>
|
<translation>上传图像失败。请重试。</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -977,6 +977,19 @@ Media size: %2
|
||||||
<translation>上传图像失败:%s</translation>
|
<translation>上传图像失败:%s</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>dialogs::UserMentions</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialogs/UserMentions.cpp" line="+53"/>
|
||||||
|
<source>This Room</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+1"/>
|
||||||
|
<source>All Rooms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>dialogs::UserProfile</name>
|
<name>dialogs::UserProfile</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1064,32 +1077,32 @@ Media size: %2
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 an image</source>
|
<source>%1 an image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a file</source>
|
<source>%1 a file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a video clip</source>
|
<source>%1 a video clip</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a sticker</source>
|
<source>%1 a sticker</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+3"/>
|
||||||
<source>%1 a notification</source>
|
<source>%1 a notification</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
<location line="+7"/>
|
||||||
<source>%1 an encrypted message</source>
|
<source>%1 an encrypted message</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1097,7 +1110,7 @@ Media size: %2
|
||||||
<context>
|
<context>
|
||||||
<name>message-description:</name>
|
<name>message-description:</name>
|
||||||
<message>
|
<message>
|
||||||
<location line="-19"/>
|
<location line="-26"/>
|
||||||
<source>sent</source>
|
<source>sent</source>
|
||||||
<comment>For when someone else is the sender</comment>
|
<comment>For when someone else is the sender</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1116,7 +1129,7 @@ Media size: %2
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Utils.cpp" line="+46"/>
|
<location filename="../../src/Utils.cpp" line="+46"/>
|
||||||
<location filename="../../src/Utils.h" line="+47"/>
|
<location filename="../../src/Utils.h" line="+55"/>
|
||||||
<source>You</source>
|
<source>You</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -91,12 +91,11 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
|
||||||
connect(sidebarActions_, &SideBarActions::createRoom, this, &ChatPage::createRoom);
|
connect(sidebarActions_, &SideBarActions::createRoom, this, &ChatPage::createRoom);
|
||||||
|
|
||||||
user_info_widget_ = new UserInfoWidget(sideBar_);
|
user_info_widget_ = new UserInfoWidget(sideBar_);
|
||||||
// user_mentions_widget_ = new UserMentionsWidget(sideBar_);
|
// user_mentions_widget_ = new UserMentionsWidget(top_bar_);
|
||||||
room_list_ = new RoomList(sideBar_);
|
room_list_ = new RoomList(sideBar_);
|
||||||
connect(room_list_, &RoomList::joinRoom, this, &ChatPage::joinRoom);
|
connect(room_list_, &RoomList::joinRoom, this, &ChatPage::joinRoom);
|
||||||
|
|
||||||
sideBarLayout_->addWidget(user_info_widget_);
|
sideBarLayout_->addWidget(user_info_widget_);
|
||||||
// sideBarLayout_->addWidget(user_mentions_widget_);
|
|
||||||
sideBarLayout_->addWidget(room_list_);
|
sideBarLayout_->addWidget(room_list_);
|
||||||
sideBarLayout_->addWidget(sidebarActions_);
|
sideBarLayout_->addWidget(sidebarActions_);
|
||||||
|
|
||||||
|
@ -1000,7 +999,7 @@ ChatPage::showNotificationsDialog(const mtx::responses::Notifications &res, cons
|
||||||
const auto user_id = utils::event_sender(item.event);
|
const auto user_id = utils::event_sender(item.event);
|
||||||
const auto body = utils::event_body(item.event);
|
const auto body = utils::event_body(item.event);
|
||||||
|
|
||||||
notifDialog->pushItem(event_id, user_id, body, room_id);
|
notifDialog->pushItem(event_id, user_id, body, room_id, current_room_);
|
||||||
|
|
||||||
} catch (const lmdb::error &e) {
|
} catch (const lmdb::error &e) {
|
||||||
nhlog::db()->warn("error while sending desktop notification: {}", e.what());
|
nhlog::db()->warn("error while sending desktop notification: {}", e.what());
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <QTabWidget>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include "UserMentions.h"
|
#include "UserMentions.h"
|
||||||
|
@ -8,31 +9,50 @@ using namespace dialogs;
|
||||||
UserMentions::UserMentions(QWidget *parent)
|
UserMentions::UserMentions(QWidget *parent)
|
||||||
: QWidget{parent}
|
: QWidget{parent}
|
||||||
{
|
{
|
||||||
|
tab_layout_ = new QTabWidget(this);
|
||||||
|
|
||||||
top_layout_ = new QVBoxLayout(this);
|
top_layout_ = new QVBoxLayout(this);
|
||||||
top_layout_->setSpacing(0);
|
top_layout_->setSpacing(0);
|
||||||
top_layout_->setMargin(0);
|
top_layout_->setMargin(0);
|
||||||
|
|
||||||
scroll_area_ = new QScrollArea(this);
|
local_scroll_area_ = new QScrollArea(this);
|
||||||
scroll_area_->setWidgetResizable(true);
|
local_scroll_area_->setWidgetResizable(true);
|
||||||
scroll_area_->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
local_scroll_area_->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|
||||||
scroll_widget_ = new QWidget(this);
|
local_scroll_widget_ = new QWidget(this);
|
||||||
scroll_widget_->setObjectName("scroll_widget");
|
local_scroll_widget_->setObjectName("local_scroll_widget");
|
||||||
|
|
||||||
|
all_scroll_area_ = new QScrollArea(this);
|
||||||
|
all_scroll_area_->setWidgetResizable(true);
|
||||||
|
all_scroll_area_->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|
||||||
|
all_scroll_widget_ = new QWidget(this);
|
||||||
|
all_scroll_widget_->setObjectName("all_scroll_widget");
|
||||||
|
|
||||||
// Height of the typing display.
|
// Height of the typing display.
|
||||||
QFont f;
|
QFont f;
|
||||||
f.setPointSizeF(f.pointSizeF() * 0.9);
|
f.setPointSizeF(f.pointSizeF() * 0.9);
|
||||||
const int bottomMargin = QFontMetrics(f).height() + 6;
|
const int bottomMargin = QFontMetrics(f).height() + 6;
|
||||||
|
|
||||||
scroll_layout_ = new QVBoxLayout(scroll_widget_);
|
local_scroll_layout_ = new QVBoxLayout(local_scroll_widget_);
|
||||||
scroll_layout_->setContentsMargins(4, 0, 15, bottomMargin);
|
local_scroll_layout_->setContentsMargins(4, 0, 15, bottomMargin);
|
||||||
scroll_layout_->setSpacing(0);
|
local_scroll_layout_->setSpacing(0);
|
||||||
scroll_layout_->setObjectName("timelinescrollarea");
|
local_scroll_layout_->setObjectName("localcrollarea");
|
||||||
|
|
||||||
scroll_area_->setWidget(scroll_widget_);
|
all_scroll_layout_ = new QVBoxLayout(all_scroll_widget_);
|
||||||
scroll_area_->setAlignment(Qt::AlignBottom);
|
all_scroll_layout_->setContentsMargins(4, 0, 15, bottomMargin);
|
||||||
|
all_scroll_layout_->setSpacing(0);
|
||||||
|
all_scroll_layout_->setObjectName("allcrollarea");
|
||||||
|
|
||||||
top_layout_->addWidget(scroll_area_);
|
local_scroll_area_->setWidget(local_scroll_widget_);
|
||||||
|
local_scroll_area_->setAlignment(Qt::AlignBottom);
|
||||||
|
|
||||||
|
all_scroll_area_->setWidget(all_scroll_widget_);
|
||||||
|
all_scroll_area_->setAlignment(Qt::AlignBottom);
|
||||||
|
|
||||||
|
tab_layout_->addTab(local_scroll_area_, tr("This Room"));
|
||||||
|
tab_layout_->addTab(all_scroll_area_, tr("All Rooms"));
|
||||||
|
top_layout_->addWidget(tab_layout_);
|
||||||
|
|
||||||
setLayout(top_layout_);
|
setLayout(top_layout_);
|
||||||
}
|
}
|
||||||
|
@ -41,18 +61,41 @@ void
|
||||||
UserMentions::pushItem(const QString &event_id,
|
UserMentions::pushItem(const QString &event_id,
|
||||||
const QString &user_id,
|
const QString &user_id,
|
||||||
const QString &body,
|
const QString &body,
|
||||||
const QString &room_id)
|
const QString &room_id,
|
||||||
|
const QString ¤t_room_id)
|
||||||
{
|
{
|
||||||
TimelineItem *view_item = new TimelineItem(
|
|
||||||
mtx::events::MessageType::Text, user_id, body, true, room_id, scroll_widget_);
|
|
||||||
view_item->setEventId(event_id);
|
|
||||||
setUpdatesEnabled(false);
|
setUpdatesEnabled(false);
|
||||||
|
|
||||||
|
// Add to the 'all' section
|
||||||
|
TimelineItem *view_item = new TimelineItem(
|
||||||
|
mtx::events::MessageType::Text, user_id, body, true, room_id, all_scroll_widget_);
|
||||||
|
view_item->setEventId(event_id);
|
||||||
view_item->hide();
|
view_item->hide();
|
||||||
|
|
||||||
scroll_layout_->addWidget(view_item);
|
all_scroll_layout_->addWidget(view_item);
|
||||||
QTimer::singleShot(0, this, [view_item, this]() {
|
QTimer::singleShot(0, this, [view_item, this]() {
|
||||||
view_item->show();
|
view_item->show();
|
||||||
view_item->adjustSize();
|
view_item->adjustSize();
|
||||||
setUpdatesEnabled(true);
|
setUpdatesEnabled(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// if it matches the current room... add it to the current room as well.
|
||||||
|
if (QString::compare(room_id, current_room_id, Qt::CaseInsensitive) == 0) {
|
||||||
|
// Add to the 'local' section
|
||||||
|
TimelineItem *local_view_item = new TimelineItem(mtx::events::MessageType::Text,
|
||||||
|
user_id,
|
||||||
|
body,
|
||||||
|
true,
|
||||||
|
room_id,
|
||||||
|
local_scroll_widget_);
|
||||||
|
local_view_item->setEventId(event_id);
|
||||||
|
local_view_item->hide();
|
||||||
|
|
||||||
|
local_scroll_layout_->addWidget(local_view_item);
|
||||||
|
|
||||||
|
QTimer::singleShot(0, this, [local_view_item, this]() {
|
||||||
|
local_view_item->show();
|
||||||
|
local_view_item->adjustSize();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <QScrollArea>
|
#include <QScrollArea>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
#include <QTabWidget>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
@ -15,14 +16,20 @@ public:
|
||||||
void pushItem(const QString &event_id,
|
void pushItem(const QString &event_id,
|
||||||
const QString &user_id,
|
const QString &user_id,
|
||||||
const QString &body,
|
const QString &body,
|
||||||
const QString &room_id);
|
const QString &room_id,
|
||||||
|
const QString ¤t_room_id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QTabWidget *tab_layout_;
|
||||||
QVBoxLayout *top_layout_;
|
QVBoxLayout *top_layout_;
|
||||||
QVBoxLayout *scroll_layout_;
|
QVBoxLayout *local_scroll_layout_;
|
||||||
|
QVBoxLayout *all_scroll_layout_;
|
||||||
|
|
||||||
QScrollArea *scroll_area_;
|
QScrollArea *local_scroll_area_;
|
||||||
QWidget *scroll_widget_;
|
QWidget *local_scroll_widget_;
|
||||||
|
|
||||||
|
QScrollArea *all_scroll_area_;
|
||||||
|
QWidget *all_scroll_widget_;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue