Compare commits

...

4 commits

Author SHA1 Message Date
2b3ca0dff9 Update gitignore 2023-11-21 14:23:24 +03:00
Sebastian Wolf
1e88a31f90 Display reactions on last message again 2023-11-21 14:18:20 +03:00
Sebastian Wolf
026d32c92a Restore search in chats 2023-11-21 14:18:20 +03:00
Sebastian Wolf
a28b9df6b5 Minor tweaks for the new session timout setting 2023-11-21 14:18:12 +03:00
18 changed files with 134 additions and 64 deletions

3
.gitignore vendored
View file

@ -53,3 +53,6 @@ compile_commands.json
# TDLib API Secrets
tdlibsecrets.h
#Convinience scripts
*.sh

View file

@ -133,8 +133,12 @@ ListItem {
if (messageListItem.messageReactions) {
messageListItem.messageReactions = null;
} else if (messageListItem.chatReactions) {
Debug.log("Using chat reactions")
messageListItem.messageReactions = chatReactions
showItemCompletelyTimer.requestedIndex = index;
showItemCompletelyTimer.start();
} else {
Debug.log("Obtaining message reactions")
tdLibWrapper.getMessageAvailableReactions(messageListItem.chatId, messageListItem.messageId);
}
}
@ -279,6 +283,7 @@ ListItem {
interval: 200
triggeredOnStart: false
onTriggered: {
Debug.log("Show item completely timer triggered, requested index: " + requestedIndex + ", current index: " + index)
if (requestedIndex === index) {
chatView.highlightMoveDuration = -1;
chatView.highlightResizeDuration = -1;

View file

@ -159,7 +159,8 @@ AccordionItem {
ComboBox {
readonly property int ttl: activeSessionsItem.inactiveSessionsTtlDays
label: qsTr("Terminate old sessions if inactive for")
label: qsTr("Session Timeout")
description: qsTr("Inactive sessions will be terminated after this timeframe")
value: (currentItem && currentItem.text) ? currentItem.text : qsTr("%1 day(s)", "", ttl).arg(ttl)
visible: ttl > 0
menu: ContextMenu {

View file

@ -127,6 +127,7 @@ TDLibReceiver::TDLibReceiver(void *tdLibClient, QObject *parent) : QThread(paren
handlers.insert("updateSupergroup", &TDLibReceiver::processUpdateSuperGroup);
handlers.insert("updateChatOnlineMemberCount", &TDLibReceiver::processChatOnlineMemberCountUpdated);
handlers.insert("messages", &TDLibReceiver::processMessages);
handlers.insert("foundChatMessages", &TDLibReceiver::processFoundChatMessages);
handlers.insert("sponsoredMessage", &TDLibReceiver::processSponsoredMessage); // TdLib <= 1.8.7
handlers.insert("sponsoredMessages", &TDLibReceiver::processSponsoredMessages); // TdLib >= 1.8.8
handlers.insert("updateNewMessage", &TDLibReceiver::processUpdateNewMessage);
@ -390,6 +391,13 @@ void TDLibReceiver::processMessages(const QVariantMap &receivedInformation)
emit messagesReceived(cleanupList(receivedInformation.value(MESSAGES).toList()), total_count);
}
void TDLibReceiver::processFoundChatMessages(const QVariantMap &receivedInformation)
{
const int total_count = receivedInformation.value(TOTAL_COUNT).toInt();
LOG("Received found chat messages, amount: " << total_count);
emit messagesReceived(cleanupList(receivedInformation.value(MESSAGES).toList()), total_count);
}
void TDLibReceiver::processSponsoredMessage(const QVariantMap &receivedInformation)
{
// TdLib <= 1.8.7

View file

@ -139,6 +139,7 @@ private:
void processUpdateSuperGroup(const QVariantMap &receivedInformation);
void processChatOnlineMemberCountUpdated(const QVariantMap &receivedInformation);
void processMessages(const QVariantMap &receivedInformation);
void processFoundChatMessages(const QVariantMap &receivedInformation);
void processSponsoredMessage(const QVariantMap &receivedInformation);
void processSponsoredMessages(const QVariantMap &receivedInformation);
void processUpdateNewMessage(const QVariantMap &receivedInformation);

View file

@ -1704,36 +1704,40 @@
<source>Sessions</source>
<translation>Sitzungen</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<translation>
<numerusform>%1 Tag</numerusform>
<numerusform>%1 Tage</numerusform>
</translation>
</message>
<message>
<source>1 week</source>
<translation type="unfinished"></translation>
<translation>1 Woche</translation>
</message>
<message>
<source>1 month</source>
<translation type="unfinished"></translation>
<translation>1 Monat</translation>
</message>
<message>
<source>3 months</source>
<translation type="unfinished"></translation>
<translation>3 Monate</translation>
</message>
<message>
<source>6 months</source>
<translation type="unfinished"></translation>
<translation>6 Monate</translation>
</message>
<message>
<source>1 year</source>
<translation type="unfinished"></translation>
<translation>1 Jahr</translation>
</message>
<message>
<source>Session Timeout</source>
<translation>Timeout von Sitzungen</translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation>Inaktive Sitzungen werden nach dieser Zeitdauer abgeschaltet</translation>
</message>
</context>
<context>

View file

@ -1706,15 +1706,11 @@ messages</numerusform>
<source>Active since: %1, last online: %2</source>
<translation>Active since: %1, last online: %2</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<translation>
<numerusform>%1 day</numerusform>
<numerusform>%1 days</numerusform>
</translation>
</message>
<message>
@ -1737,6 +1733,14 @@ messages</numerusform>
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1704,10 +1704,6 @@
<source>Active since: %1, last online: %2</source>
<translation>Activo desde: %1, último en línea: %2</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1735,6 +1731,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1705,10 +1705,6 @@
<source>Active since: %1, last online: %2</source>
<translation>Aktiivinen %1 alkaen, viimeksi paikalla: %2</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1736,6 +1732,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1704,10 +1704,6 @@
<source>Active since: %1, last online: %2</source>
<translation>Actif depuis : %1, en ligne : %2</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1735,6 +1731,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1677,10 +1677,6 @@
<source>Active since: %1, last online: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1707,6 +1703,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1704,10 +1704,6 @@
<source>Active since: %1, last online: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1735,6 +1731,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1731,10 +1731,6 @@
<source>Active since: %1, last online: %2</source>
<translation>Aktywny od: %1, ostatnio aktywny: %2</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1763,6 +1759,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1734,10 +1734,6 @@
<source>Active since: %1, last online: %2</source>
<translation>Активен с: %1, был онлайн: %2</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1766,6 +1762,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1731,10 +1731,6 @@
<source>Active since: %1, last online: %2</source>
<translation>Aktívna od: %1, naposledy pripojená: %2</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1763,6 +1759,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1704,10 +1704,6 @@
<source>Active since: %1, last online: %2</source>
<translation>Aktiv sedan: %1, senast online: %2</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1735,6 +1731,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1678,10 +1678,6 @@
<source>Active since: %1, last online: %2</source>
<translation>: %1, 线: %2</translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1708,6 +1704,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>

View file

@ -1704,10 +1704,6 @@
<source>Active since: %1, last online: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Terminate old sessions if inactive for</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation type="unfinished">
@ -1735,6 +1731,14 @@
<source>1 year</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsStorage</name>