Compare commits

..

No commits in common. "062f5d3811691498a68ea0c24714277a3c3d0e3c" and "f58afe92cb4bba9d46dff3e7726c6079448aae01" have entirely different histories.

20 changed files with 273 additions and 399 deletions

View file

@ -132,22 +132,18 @@ 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);
}
}
}
onDoubleClicked: {
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);
}
}
onPressAndHold: {
if (openMenuOnPressAndHold) {
openContextMenu()

View file

@ -108,38 +108,27 @@ ListItem {
}
Rectangle {
id: chatUnreadReactionCountBackground
color: isMuted ? ((Theme.colorScheme === Theme.DarkOnLight) ? "lightgray" : "dimgray") : Theme.highlightBackgroundColor
width: Theme.fontSizeLarge
height: Theme.fontSizeLarge
anchors.right: parent.right
anchors.top: parent.top
radius: parent.width / 2
visible: chatListViewItem.unreadReactionCount > 0 || chatListViewItem.unreadMentionCount > 0
Icon {
source: "image://theme/icon-s-favorite"
height: Theme.iconSizeExtraSmall
width: Theme.iconSizeExtraSmall
highlighted: chatListViewItem.highlighted
anchors.centerIn: parent
visible: chatListViewItem.unreadReactionCount > 0 && !chatListViewItem.unreadMentionCount
}
Text {
font {
pixelSize: Theme.iconSizeExtraSmall
bold: true
}
color: Theme.primaryColor
anchors.centerIn: parent
visible: chatListViewItem.unreadMentionCount > 0
opacity: isMuted ? Theme.opacityHigh : 1.0
text: "@"
}
visible: chatListViewItem.unreadReactionCount > 0
}
Icon {
source: "image://theme/icon-s-favorite"
height: Theme.iconSizeExtraSmall
width: Theme.iconSizeExtraSmall
highlighted: chatListViewItem.highlighted
anchors.centerIn: chatUnreadReactionCountBackground
visible: chatListViewItem.unreadReactionCount > 0
}
}
}
Column {
id: contentColumn
anchors {

View file

@ -609,15 +609,6 @@ Page {
chatViewCooldownTimer.restart();
chatViewStartupReadTimer.restart();
var remainingDoubleTapHints = appSettings.remainingDoubleTapHints;
Debug.log("Remaining double tap hints: " + remainingDoubleTapHints);
if (remainingDoubleTapHints > 0) {
doubleTapHintTimer.start();
tapHint.visible = true;
tapHintLabel.visible = true;
appSettings.remainingDoubleTapHints = remainingDoubleTapHints - 1;
}
}
onNewMessageReceived: {
if (( chatView.manuallyScrolledToBottom && Qt.application.state === Qt.ApplicationActive ) || message.sender_id.user_id === chatPage.myUserId) {
@ -2166,31 +2157,4 @@ Page {
}
}
}
Timer {
id: doubleTapHintTimer
running: true
triggeredOnStart: false
repeat: false
interval: 6000
onTriggered: {
tapHint.visible = false;
tapHintLabel.visible = false;
}
}
TapInteractionHint {
id: tapHint
loops: Animation.Infinite
taps: 2
anchors.centerIn: parent
visible: false
}
InteractionHintLabel {
id: tapHintLabel
anchors.bottom: parent.bottom
text: qsTr("Double-tap on a message to choose a reaction")
visible: false
}
}

View file

@ -12,7 +12,7 @@ Name: harbour-fernschreiber
Summary: Fernschreiber is a Telegram client for Aurora OS
Version: 0.17
Release: 7
Release: 6
Group: Qt/Qt
License: LICENSE
URL: http://werkwolf.eu/

View file

@ -35,7 +35,6 @@ namespace {
const QString KEY_STORAGE_OPTIMIZER("useStorageOptimizer");
const QString KEY_INLINEBOT_LOCATION_ACCESS("allowInlineBotLocationAccess");
const QString KEY_REMAINING_INTERACTION_HINTS("remainingInteractionHints");
const QString KEY_REMAINING_DOUBLE_TAP_HINTS("remainingDoubleTapHints");
const QString KEY_ONLINE_ONLY_MODE("onlineOnlyMode");
const QString KEY_DELAY_MESSAGE_READ("delayMessageRead");
const QString KEY_FOCUS_TEXTAREA_ON_CHAT_OPEN("focusTextAreaOnChatOpen");
@ -244,20 +243,6 @@ void AppSettings::setRemainingInteractionHints(int remainingHints)
}
}
int AppSettings::remainingDoubleTapHints() const
{
return settings.value(KEY_REMAINING_DOUBLE_TAP_HINTS, 3).toInt();
}
void AppSettings::setRemainingDoubleTapHints(int remainingHints)
{
if (remainingDoubleTapHints() != remainingHints) {
LOG(KEY_REMAINING_DOUBLE_TAP_HINTS << remainingHints);
settings.setValue(KEY_REMAINING_DOUBLE_TAP_HINTS, remainingHints);
emit remainingDoubleTapHintsChanged();
}
}
bool AppSettings::onlineOnlyMode() const
{
return settings.value(KEY_ONLINE_ONLY_MODE, false).toBool();

View file

@ -38,7 +38,6 @@ class AppSettings : public QObject {
Q_PROPERTY(bool storageOptimizer READ storageOptimizer WRITE setStorageOptimizer NOTIFY storageOptimizerChanged)
Q_PROPERTY(bool allowInlineBotLocationAccess READ allowInlineBotLocationAccess WRITE setAllowInlineBotLocationAccess NOTIFY allowInlineBotLocationAccessChanged)
Q_PROPERTY(int remainingInteractionHints READ remainingInteractionHints WRITE setRemainingInteractionHints NOTIFY remainingInteractionHintsChanged)
Q_PROPERTY(int remainingDoubleTapHints READ remainingDoubleTapHints WRITE setRemainingDoubleTapHints NOTIFY remainingDoubleTapHintsChanged)
Q_PROPERTY(bool onlineOnlyMode READ onlineOnlyMode WRITE setOnlineOnlyMode NOTIFY onlineOnlyModeChanged)
Q_PROPERTY(bool delayMessageRead READ delayMessageRead WRITE setDelayMessageRead NOTIFY delayMessageReadChanged)
Q_PROPERTY(bool focusTextAreaOnChatOpen READ getFocusTextAreaOnChatOpen WRITE setFocusTextAreaOnChatOpen NOTIFY focusTextAreaOnChatOpenChanged)
@ -105,9 +104,6 @@ public:
int remainingInteractionHints() const;
void setRemainingInteractionHints(int remainingHints);
int remainingDoubleTapHints() const;
void setRemainingDoubleTapHints(int remainingHints);
bool onlineOnlyMode() const;
void setOnlineOnlyMode(bool enable);
@ -138,7 +134,6 @@ signals:
void storageOptimizerChanged();
void allowInlineBotLocationAccessChanged();
void remainingInteractionHintsChanged();
void remainingDoubleTapHintsChanged();
void onlineOnlyModeChanged();
void delayMessageReadChanged();
void focusTextAreaOnChatOpenChanged();

View file

@ -175,7 +175,6 @@ TDLibReceiver::TDLibReceiver(void *tdLibClient, QObject *parent) : QThread(paren
handlers.insert("updateMessageInteractionInfo", &TDLibReceiver::processUpdateMessageInteractionInfo);
handlers.insert("sessions", &TDLibReceiver::processSessions);
handlers.insert("availableReactions", &TDLibReceiver::processAvailableReactions);
handlers.insert("updateMessageMentionRead", &TDLibReceiver::processUpdateChatUnreadMentionCount);
handlers.insert("updateChatUnreadMentionCount", &TDLibReceiver::processUpdateChatUnreadMentionCount);
handlers.insert("updateChatUnreadReactionCount", &TDLibReceiver::processUpdateChatUnreadReactionCount);
handlers.insert("updateActiveEmojiReactions", &TDLibReceiver::processUpdateActiveEmojiReactions);
@ -737,8 +736,6 @@ void TDLibReceiver::processAvailableReactions(const QVariantMap &receivedInforma
void TDLibReceiver::processUpdateChatUnreadMentionCount(const QVariantMap &receivedInformation)
{
// Handles both updateMessageMentionRead and updateChatUnreadMentionCount
// They both have chat_id and unread_mention_count which is all we need
const qlonglong chatId = receivedInformation.value(CHAT_ID).toLongLong();
const int unreadMentionCount = receivedInformation.value(UNREAD_MENTION_COUNT).toInt();
LOG("Chat unread mention count updated" << chatId << unreadMentionCount);

View file

@ -483,10 +483,6 @@
<source>Deleted User</source>
<translation>Gelöschtes Konto</translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation>Drücke zweimal auf eine Nachricht, um eine Reaktion auszuwählen</translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>

View file

@ -483,10 +483,6 @@
<source>Deleted User</source>
<translation>Deleted User</translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>

File diff suppressed because it is too large Load diff

View file

@ -483,10 +483,6 @@
<source>Deleted User</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="fr">
<TS version="2.1" language="en">
<context>
<name>AboutPage</name>
<message>
@ -483,10 +483,6 @@
<source>Deleted User</source>
<translation>Supprimer l&apos;utilisateur</translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation>Toucher deux fois sur un message pour réagir</translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>
@ -1163,7 +1159,7 @@
</message>
<message>
<source>No contacts found.</source>
<translation>Aucun contact trouvé</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -1581,23 +1577,23 @@
</message>
<message>
<source>Always append message preview to notifications</source>
<translation>Toujours visualiser le message dans les notifications</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>In addition to showing the number of unread messages, the latest message will also be appended to notifications.</source>
<translation>En plus d&apos;afficher le nombre de messages non-lus, le dernier message sera également ajouté aux notifications.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Highlight unread messages</source>
<translation>Mettre en valeur les messages non-lus</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Highlight Conversations with unread messages</source>
<translation>Mettre en valeur les conversations avec des messages non-lus</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hide content in notifications</source>
<translation>Masquer le contenu dans les notifications</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -1710,38 +1706,38 @@
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation>
<numerusform>%1 jour(s)</numerusform>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>1 week</source>
<translation>1 semaine</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>1 month</source>
<translation>1 mois</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>3 months</source>
<translation>3 mois</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>6 months</source>
<translation>6 mois</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>1 year</source>
<translation>1 année</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation>Délai d&apos;inactivité de session</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation>Sessions inactives seront terminées après ce délai</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>

View file

@ -473,10 +473,6 @@
<source>Deleted User</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>

View file

@ -483,10 +483,6 @@
<source>Deleted User</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>

View file

@ -493,10 +493,6 @@
<source>Deleted User</source>
<translation>Usunięty użytkownik</translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>

View file

@ -348,11 +348,11 @@
</message>
<message>
<source>Leave Chat</source>
<translation>Выйти из чата</translation>
<translation>Выйти из Чата</translation>
</message>
<message>
<source>Join Chat</source>
<translation>Зайти в чат</translation>
<translation>Зайти в Чат</translation>
</message>
<message>
<source>Leaving chat</source>
@ -427,7 +427,7 @@
</message>
<message>
<source>Search in Chat</source>
<translation>Поиск в чате</translation>
<translation>Найти в Чате</translation>
</message>
<message>
<source>Search in chat...</source>
@ -493,10 +493,6 @@
<source>Deleted User</source>
<translation>Удалённый пользователь</translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>
@ -1156,7 +1152,7 @@
</message>
<message>
<source>Secret Chat</source>
<translation>Секретный чат</translation>
<translation>Секретный Чат</translation>
</message>
<message>
<source>End-to-end-encrypted, accessible on this device only</source>
@ -1238,7 +1234,7 @@
</message>
<message>
<source>New Chat</source>
<translation>Новый чат</translation>
<translation>Новый Чат</translation>
</message>
<message>
<source>Filter your chats...</source>
@ -1246,7 +1242,7 @@
</message>
<message>
<source>Search Chats</source>
<translation>Поиск чатов</translation>
<translation>Найти Чаты</translation>
</message>
<message>
<source>Download of %1 successful.</source>
@ -1457,7 +1453,7 @@
<name>SearchChatsPage</name>
<message>
<source>No chats found.</source>
<translation>Ничего не найдено</translation>
<translation>Чаты не найдены</translation>
</message>
<message>
<source>Searching chats...</source>
@ -1465,7 +1461,7 @@
</message>
<message>
<source>Private Chat</source>
<translation>Приватный чат</translation>
<translation>Приватный Чат</translation>
</message>
<message>
<source>Group</source>
@ -1493,7 +1489,7 @@
</message>
<message>
<source>Search Chats</source>
<translation>Поиск чатов</translation>
<translation>Найти Чаты</translation>
</message>
<message>
<source>Search a chat...</source>
@ -1611,23 +1607,23 @@
</message>
<message>
<source>Always append message preview to notifications</source>
<translation>Всегда показывать последнее сообщение на экране событий</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>In addition to showing the number of unread messages, the latest message will also be appended to notifications.</source>
<translation>Включать в текст на экране событий не только количество непрочитанных сообщений, но и содержимое последнего сообщения.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Highlight unread messages</source>
<translation>Выделять непрочитанные сообщения</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Highlight Conversations with unread messages</source>
<translation>Помечать чаты и каналы с непрочитанными сообщениями другим шрифтом и цветом.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hide content in notifications</source>
<translation>Не показывать содержимое сообщений в уведомлениях</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -1740,39 +1736,39 @@
</message>
<message numerus="yes">
<source>%1 day(s)</source>
<translation>
<numerusform>%1 день</numerusform>
<numerusform>%1 дня</numerusform>
<numerusform>%1 дней</numerusform>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>1 week</source>
<translation>1 неделя</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>1 month</source>
<translation>1 месяц</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>3 months</source>
<translation>3 месяца</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>6 months</source>
<translation>6 месяцев</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>1 year</source>
<translation>1 год</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Session Timeout</source>
<translation>Таймаут неактивности</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inactive sessions will be terminated after this timeframe</source>
<translation>Неактивные сеансы будут автоматически завершены через указанное время.</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>

View file

@ -493,10 +493,6 @@
<source>Deleted User</source>
<translation>Odstránený používateľ</translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>

View file

@ -483,10 +483,6 @@
<source>Deleted User</source>
<translation>Tog bort användare</translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>

View file

@ -473,10 +473,6 @@
<source>Deleted User</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>

View file

@ -483,10 +483,6 @@
<source>Deleted User</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Double-tap on a message to choose a reaction</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatSelectionPage</name>