Adjust new sorting logic to TDLib 1.6.0, add contributors' info

This commit is contained in:
Sebastian J. Wolf 2020-09-28 20:47:03 +02:00
parent c333a968d6
commit 5fa2a1200f
10 changed files with 58 additions and 38 deletions

View file

@ -4,6 +4,19 @@ A Telegram client for Sailfish OS
## Author ## Author
Sebastian J. Wolf [sebastian@ygriega.de](mailto:sebastian@ygriega.de) Sebastian J. Wolf [sebastian@ygriega.de](mailto:sebastian@ygriega.de)
## Contributions
Fernschreiber wouldn't be the same without all the people helping in making it better. Thank you very much to all contributors!
### Code (Features, Bugfixes, Optimizations etc.)
- Chat list model, TDLib receiver, project dependencies: [Slava Monich](https://github.com/monich)
### Translations
- Chinese: [dashinfantry](https://github.com/dashinfantry)
- Hungarian [edp17](https://github.com/edp17)
- Polish: [atlochowski](https://github.com/atlochowski)
- Spanish: [GNUuser](https://github.com/GNUuser)
## License ## License
Licensed under GNU GPLv3 Licensed under GNU GPLv3
@ -28,7 +41,4 @@ This project uses
- Emoji parsing and artwork by [Twitter Emoji (Twemoji)](http://twitter.github.io/twemoji/), copyright 2018 Twitter, Inc and other contributors, Code licensed under the [MIT License](http://opensource.org/licenses/MIT), Graphics licensed under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/) - Emoji parsing and artwork by [Twitter Emoji (Twemoji)](http://twitter.github.io/twemoji/), copyright 2018 Twitter, Inc and other contributors, Code licensed under the [MIT License](http://opensource.org/licenses/MIT), Graphics licensed under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
Fernschreiber was translated to several languages. Thanks to all contributors! Fernschreiber was translated to several languages. Thanks to all contributors!
- Chinese: [dashinfantry](https://github.com/dashinfantry)
- Hungarian [edp17](https://github.com/edp17)
- Polish: [atlochowski](https://github.com/atlochowski)
- Spanish: [GNUuser](https://github.com/GNUuser)

View file

@ -77,8 +77,13 @@ Page {
} }
Label { Label {
text: qsTr("By Sebastian J. Wolf") text: qsTr("By Sebastian J. Wolf and <a href=\"https://github.com/Wunderfitz/harbour-fernschreiber#contributions\">other contributors</a>")
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
width: parent.width - ( 2 * Theme.horizontalPageMargin )
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.Wrap
linkColor: Theme.highlightColor
onLinkActivated: Qt.openUrlExternally(link)
anchors { anchors {
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
} }

View file

@ -77,7 +77,7 @@ bool ChatListModel::ChatData::setOrder(const QString &newOrder)
ChatListModel::ChatListModel(TDLibWrapper *tdLibWrapper) ChatListModel::ChatListModel(TDLibWrapper *tdLibWrapper)
{ {
tdLibWrapper = tdLibWrapper; this->tdLibWrapper = tdLibWrapper;
connect(tdLibWrapper, SIGNAL(newChatDiscovered(QString, QVariantMap)), this, SLOT(handleChatDiscovered(QString, QVariantMap))); connect(tdLibWrapper, SIGNAL(newChatDiscovered(QString, QVariantMap)), this, SLOT(handleChatDiscovered(QString, QVariantMap)));
connect(tdLibWrapper, SIGNAL(chatLastMessageUpdated(QString, QString, QVariantMap)), this, SLOT(handleChatLastMessageUpdated(QString, QString, QVariantMap))); connect(tdLibWrapper, SIGNAL(chatLastMessageUpdated(QString, QString, QVariantMap)), this, SLOT(handleChatLastMessageUpdated(QString, QString, QVariantMap)));
connect(tdLibWrapper, SIGNAL(chatOrderUpdated(QString, QString)), this, SLOT(handleChatOrderUpdated(QString, QString))); connect(tdLibWrapper, SIGNAL(chatOrderUpdated(QString, QString)), this, SLOT(handleChatOrderUpdated(QString, QString)));

View file

@ -219,7 +219,12 @@ void TDLibReceiver::processUpdateUnreadChatCount(const QVariantMap &receivedInfo
void TDLibReceiver::processUpdateChatLastMessage(const QVariantMap &receivedInformation) void TDLibReceiver::processUpdateChatLastMessage(const QVariantMap &receivedInformation)
{ {
const QString chat_id(receivedInformation.value(CHAT_ID).toString()); const QString chat_id(receivedInformation.value(CHAT_ID).toString());
const QString order(findChatPositionOrder(receivedInformation.value(POSITIONS).toList())); QString order;
if (receivedInformation.contains(POSITIONS)) {
order = findChatPositionOrder(receivedInformation.value(POSITIONS).toList());
} else {
order = receivedInformation.value(ORDER).toString();
}
const QVariantMap lastMessage = receivedInformation.value(LAST_MESSAGE).toMap(); const QVariantMap lastMessage = receivedInformation.value(LAST_MESSAGE).toMap();
LOG("Last message of chat" << chat_id << "updated, order" << order << "type" << lastMessage.value("@type").toString()); LOG("Last message of chat" << chat_id << "updated, order" << order << "type" << lastMessage.value("@type").toString());
emit chatLastMessageUpdated(chat_id, order, lastMessage); emit chatLastMessageUpdated(chat_id, order, lastMessage);

View file

@ -11,10 +11,6 @@
<source>A Telegram client for Sailfish OS</source> <source>A Telegram client for Sailfish OS</source>
<translation>Ein Telegram-Client für Sailfish OS</translation> <translation>Ein Telegram-Client für Sailfish OS</translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf</source>
<translation>Von Sebastian J. Wolf</translation>
</message>
<message> <message>
<source>Send E-Mail</source> <source>Send E-Mail</source>
<translation>E-Mail verschicken</translation> <translation>E-Mail verschicken</translation>
@ -75,6 +71,10 @@
<source>Open twemoji on GitHub</source> <source>Open twemoji on GitHub</source>
<translation>Twemoji auf GitHub öffnen</translation> <translation>Twemoji auf GitHub öffnen</translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf and &lt;a href=&quot;https://github.com/Wunderfitz/harbour-fernschreiber#contributions&quot;&gt;other contributors&lt;/a&gt;</source>
<translation>Von Sebastian J. Wolf und &lt;a href=&quot;https://github.com/Wunderfitz/harbour-fernschreiber#contributions&quot;&gt;anderen Beitragenden&lt;/a&gt;</translation>
</message>
</context> </context>
<context> <context>
<name>BackgroundProgressIndicator</name> <name>BackgroundProgressIndicator</name>

View file

@ -11,10 +11,6 @@
<source>A Telegram client for Sailfish OS</source> <source>A Telegram client for Sailfish OS</source>
<translation>Un cliente de Telegram para Sailfish SO</translation> <translation>Un cliente de Telegram para Sailfish SO</translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf</source>
<translation>Por Sebastian J. Wolf</translation>
</message>
<message> <message>
<source>Send E-Mail</source> <source>Send E-Mail</source>
<translation>Enviar C.Electron.</translation> <translation>Enviar C.Electron.</translation>
@ -75,6 +71,10 @@
<source>Open twemoji on GitHub</source> <source>Open twemoji on GitHub</source>
<translation>Biblioteca twemoji</translation> <translation>Biblioteca twemoji</translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf and &lt;a href=&quot;https://github.com/Wunderfitz/harbour-fernschreiber#contributions&quot;&gt;other contributors&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BackgroundProgressIndicator</name> <name>BackgroundProgressIndicator</name>

View file

@ -11,10 +11,6 @@
<source>A Telegram client for Sailfish OS</source> <source>A Telegram client for Sailfish OS</source>
<translation>Sailfish OS Telegram kliens</translation> <translation>Sailfish OS Telegram kliens</translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf</source>
<translation>Készítette Sebastian J. Wolf</translation>
</message>
<message> <message>
<source>Send E-Mail</source> <source>Send E-Mail</source>
<translation>E-mail küldés</translation> <translation>E-mail küldés</translation>
@ -75,6 +71,10 @@
<source>Open twemoji on GitHub</source> <source>Open twemoji on GitHub</source>
<translation>twemoji megnyitása a GitHub-on</translation> <translation>twemoji megnyitása a GitHub-on</translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf and &lt;a href=&quot;https://github.com/Wunderfitz/harbour-fernschreiber#contributions&quot;&gt;other contributors&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BackgroundProgressIndicator</name> <name>BackgroundProgressIndicator</name>

View file

@ -11,10 +11,6 @@
<source>A Telegram client for Sailfish OS</source> <source>A Telegram client for Sailfish OS</source>
<translation>Klien Telegram dla Sailfish OS</translation> <translation>Klien Telegram dla Sailfish OS</translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf</source>
<translation>Stworzony przez Sebastian J. Wolf</translation>
</message>
<message> <message>
<source>Send E-Mail</source> <source>Send E-Mail</source>
<translation>Wyślij e-mail</translation> <translation>Wyślij e-mail</translation>
@ -75,6 +71,10 @@
<source>Open twemoji on GitHub</source> <source>Open twemoji on GitHub</source>
<translation>Otwórz twemoji na GitHub</translation> <translation>Otwórz twemoji na GitHub</translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf and &lt;a href=&quot;https://github.com/Wunderfitz/harbour-fernschreiber#contributions&quot;&gt;other contributors&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BackgroundProgressIndicator</name> <name>BackgroundProgressIndicator</name>

View file

@ -11,10 +11,6 @@
<source>A Telegram client for Sailfish OS</source> <source>A Telegram client for Sailfish OS</source>
<translation> Telegram </translation> <translation> Telegram </translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf</source>
<translation> Sebastian J. Wolf</translation>
</message>
<message> <message>
<source>Send E-Mail</source> <source>Send E-Mail</source>
<translation></translation> <translation></translation>
@ -75,6 +71,10 @@
<source>Open twemoji on GitHub</source> <source>Open twemoji on GitHub</source>
<translation> Github Twemoji </translation> <translation> Github Twemoji </translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf and &lt;a href=&quot;https://github.com/Wunderfitz/harbour-fernschreiber#contributions&quot;&gt;other contributors&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BackgroundProgressIndicator</name> <name>BackgroundProgressIndicator</name>

View file

@ -11,10 +11,6 @@
<source>A Telegram client for Sailfish OS</source> <source>A Telegram client for Sailfish OS</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Send E-Mail</source> <source>Send E-Mail</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -75,6 +71,10 @@
<source>Open twemoji on GitHub</source> <source>Open twemoji on GitHub</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>By Sebastian J. Wolf and &lt;a href=&quot;https://github.com/Wunderfitz/harbour-fernschreiber#contributions&quot;&gt;other contributors&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BackgroundProgressIndicator</name> <name>BackgroundProgressIndicator</name>