diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml
index 9e9c231..993db38 100644
--- a/qml/pages/ChatPage.qml
+++ b/qml/pages/ChatPage.qml
@@ -609,6 +609,15 @@ 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) {
@@ -2157,4 +2166,31 @@ 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
+ }
}
diff --git a/src/appsettings.cpp b/src/appsettings.cpp
index caf64d5..8ed3c52 100644
--- a/src/appsettings.cpp
+++ b/src/appsettings.cpp
@@ -35,6 +35,7 @@ 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");
@@ -243,6 +244,20 @@ 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();
diff --git a/src/appsettings.h b/src/appsettings.h
index e4a1a2d..84e59d9 100644
--- a/src/appsettings.h
+++ b/src/appsettings.h
@@ -38,6 +38,7 @@ 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)
@@ -104,6 +105,9 @@ public:
int remainingInteractionHints() const;
void setRemainingInteractionHints(int remainingHints);
+ int remainingDoubleTapHints() const;
+ void setRemainingDoubleTapHints(int remainingHints);
+
bool onlineOnlyMode() const;
void setOnlineOnlyMode(bool enable);
@@ -134,6 +138,7 @@ signals:
void storageOptimizerChanged();
void allowInlineBotLocationAccessChanged();
void remainingInteractionHintsChanged();
+ void remainingDoubleTapHintsChanged();
void onlineOnlyModeChanged();
void delayMessageReadChanged();
void focusTextAreaOnChatOpenChanged();
diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts
index 489417e..45b4cdf 100644
--- a/translations/harbour-fernschreiber-de.ts
+++ b/translations/harbour-fernschreiber-de.ts
@@ -483,6 +483,10 @@
Gelöschtes Konto
+
+
+ Drücke zweimal auf eine Nachricht, um eine Reaktion auszuwählen
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-en.ts b/translations/harbour-fernschreiber-en.ts
index 2be078c..e33c491 100644
--- a/translations/harbour-fernschreiber-en.ts
+++ b/translations/harbour-fernschreiber-en.ts
@@ -483,6 +483,10 @@
Deleted User
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts
index d35ab77..19da923 100644
--- a/translations/harbour-fernschreiber-es.ts
+++ b/translations/harbour-fernschreiber-es.ts
@@ -483,6 +483,10 @@
Usuario borrado
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts
index 1844a7a..5af7081 100644
--- a/translations/harbour-fernschreiber-fi.ts
+++ b/translations/harbour-fernschreiber-fi.ts
@@ -483,6 +483,10 @@
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-fr.ts b/translations/harbour-fernschreiber-fr.ts
index 3e2f87d..69b93ba 100644
--- a/translations/harbour-fernschreiber-fr.ts
+++ b/translations/harbour-fernschreiber-fr.ts
@@ -483,6 +483,10 @@
Supprimer l'utilisateur
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts
index ae8f9f0..96c1f31 100644
--- a/translations/harbour-fernschreiber-hu.ts
+++ b/translations/harbour-fernschreiber-hu.ts
@@ -473,6 +473,10 @@
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts
index 984d369..077dc42 100644
--- a/translations/harbour-fernschreiber-it.ts
+++ b/translations/harbour-fernschreiber-it.ts
@@ -483,6 +483,10 @@
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts
index dde307f..f063ebf 100644
--- a/translations/harbour-fernschreiber-pl.ts
+++ b/translations/harbour-fernschreiber-pl.ts
@@ -493,6 +493,10 @@
Usunięty użytkownik
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts
index 1b26ddc..71ca7a5 100644
--- a/translations/harbour-fernschreiber-ru.ts
+++ b/translations/harbour-fernschreiber-ru.ts
@@ -493,6 +493,10 @@
Удалённый пользователь
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-sk.ts b/translations/harbour-fernschreiber-sk.ts
index 64c9d41..feb8003 100644
--- a/translations/harbour-fernschreiber-sk.ts
+++ b/translations/harbour-fernschreiber-sk.ts
@@ -493,6 +493,10 @@
Odstránený používateľ
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts
index a8b3ec7..462fda1 100644
--- a/translations/harbour-fernschreiber-sv.ts
+++ b/translations/harbour-fernschreiber-sv.ts
@@ -483,6 +483,10 @@
Tog bort användare
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts
index 89f248d..fec9b66 100644
--- a/translations/harbour-fernschreiber-zh_CN.ts
+++ b/translations/harbour-fernschreiber-zh_CN.ts
@@ -473,6 +473,10 @@
+
+
+
+
ChatSelectionPage
diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts
index f39583e..72c8cae 100644
--- a/translations/harbour-fernschreiber.ts
+++ b/translations/harbour-fernschreiber.ts
@@ -483,6 +483,10 @@
+
+
+
+
ChatSelectionPage