Interaction hint for new reactions behavior
This commit is contained in:
parent
02b6dd2e6d
commit
16bcef3c78
18 changed files with 110 additions and 2 deletions
|
@ -609,6 +609,15 @@ Page {
|
||||||
|
|
||||||
chatViewCooldownTimer.restart();
|
chatViewCooldownTimer.restart();
|
||||||
chatViewStartupReadTimer.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: {
|
onNewMessageReceived: {
|
||||||
if (( chatView.manuallyScrolledToBottom && Qt.application.state === Qt.ApplicationActive ) || message.sender_id.user_id === chatPage.myUserId) {
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ Name: harbour-fernschreiber
|
||||||
|
|
||||||
Summary: Fernschreiber is a Telegram client for Sailfish OS
|
Summary: Fernschreiber is a Telegram client for Sailfish OS
|
||||||
Version: 0.17
|
Version: 0.17
|
||||||
Release: 5
|
Release: 6
|
||||||
Group: Qt/Qt
|
Group: Qt/Qt
|
||||||
License: LICENSE
|
License: LICENSE
|
||||||
URL: http://werkwolf.eu/
|
URL: http://werkwolf.eu/
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Name: harbour-fernschreiber
|
Name: harbour-fernschreiber
|
||||||
Summary: Fernschreiber is a Telegram client for Sailfish OS
|
Summary: Fernschreiber is a Telegram client for Sailfish OS
|
||||||
Version: 0.17
|
Version: 0.17
|
||||||
Release: 5
|
Release: 6
|
||||||
# The contents of the Group field should be one of the groups listed here:
|
# The contents of the Group field should be one of the groups listed here:
|
||||||
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
|
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
|
||||||
Group: Qt/Qt
|
Group: Qt/Qt
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace {
|
||||||
const QString KEY_STORAGE_OPTIMIZER("useStorageOptimizer");
|
const QString KEY_STORAGE_OPTIMIZER("useStorageOptimizer");
|
||||||
const QString KEY_INLINEBOT_LOCATION_ACCESS("allowInlineBotLocationAccess");
|
const QString KEY_INLINEBOT_LOCATION_ACCESS("allowInlineBotLocationAccess");
|
||||||
const QString KEY_REMAINING_INTERACTION_HINTS("remainingInteractionHints");
|
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_ONLINE_ONLY_MODE("onlineOnlyMode");
|
||||||
const QString KEY_DELAY_MESSAGE_READ("delayMessageRead");
|
const QString KEY_DELAY_MESSAGE_READ("delayMessageRead");
|
||||||
const QString KEY_FOCUS_TEXTAREA_ON_CHAT_OPEN("focusTextAreaOnChatOpen");
|
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
|
bool AppSettings::onlineOnlyMode() const
|
||||||
{
|
{
|
||||||
return settings.value(KEY_ONLINE_ONLY_MODE, false).toBool();
|
return settings.value(KEY_ONLINE_ONLY_MODE, false).toBool();
|
||||||
|
|
|
@ -38,6 +38,7 @@ class AppSettings : public QObject {
|
||||||
Q_PROPERTY(bool storageOptimizer READ storageOptimizer WRITE setStorageOptimizer NOTIFY storageOptimizerChanged)
|
Q_PROPERTY(bool storageOptimizer READ storageOptimizer WRITE setStorageOptimizer NOTIFY storageOptimizerChanged)
|
||||||
Q_PROPERTY(bool allowInlineBotLocationAccess READ allowInlineBotLocationAccess WRITE setAllowInlineBotLocationAccess NOTIFY allowInlineBotLocationAccessChanged)
|
Q_PROPERTY(bool allowInlineBotLocationAccess READ allowInlineBotLocationAccess WRITE setAllowInlineBotLocationAccess NOTIFY allowInlineBotLocationAccessChanged)
|
||||||
Q_PROPERTY(int remainingInteractionHints READ remainingInteractionHints WRITE setRemainingInteractionHints NOTIFY remainingInteractionHintsChanged)
|
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 onlineOnlyMode READ onlineOnlyMode WRITE setOnlineOnlyMode NOTIFY onlineOnlyModeChanged)
|
||||||
Q_PROPERTY(bool delayMessageRead READ delayMessageRead WRITE setDelayMessageRead NOTIFY delayMessageReadChanged)
|
Q_PROPERTY(bool delayMessageRead READ delayMessageRead WRITE setDelayMessageRead NOTIFY delayMessageReadChanged)
|
||||||
Q_PROPERTY(bool focusTextAreaOnChatOpen READ getFocusTextAreaOnChatOpen WRITE setFocusTextAreaOnChatOpen NOTIFY focusTextAreaOnChatOpenChanged)
|
Q_PROPERTY(bool focusTextAreaOnChatOpen READ getFocusTextAreaOnChatOpen WRITE setFocusTextAreaOnChatOpen NOTIFY focusTextAreaOnChatOpenChanged)
|
||||||
|
@ -104,6 +105,9 @@ public:
|
||||||
int remainingInteractionHints() const;
|
int remainingInteractionHints() const;
|
||||||
void setRemainingInteractionHints(int remainingHints);
|
void setRemainingInteractionHints(int remainingHints);
|
||||||
|
|
||||||
|
int remainingDoubleTapHints() const;
|
||||||
|
void setRemainingDoubleTapHints(int remainingHints);
|
||||||
|
|
||||||
bool onlineOnlyMode() const;
|
bool onlineOnlyMode() const;
|
||||||
void setOnlineOnlyMode(bool enable);
|
void setOnlineOnlyMode(bool enable);
|
||||||
|
|
||||||
|
@ -134,6 +138,7 @@ signals:
|
||||||
void storageOptimizerChanged();
|
void storageOptimizerChanged();
|
||||||
void allowInlineBotLocationAccessChanged();
|
void allowInlineBotLocationAccessChanged();
|
||||||
void remainingInteractionHintsChanged();
|
void remainingInteractionHintsChanged();
|
||||||
|
void remainingDoubleTapHintsChanged();
|
||||||
void onlineOnlyModeChanged();
|
void onlineOnlyModeChanged();
|
||||||
void delayMessageReadChanged();
|
void delayMessageReadChanged();
|
||||||
void focusTextAreaOnChatOpenChanged();
|
void focusTextAreaOnChatOpenChanged();
|
||||||
|
|
|
@ -483,6 +483,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation>Gelöschtes Konto</translation>
|
<translation>Gelöschtes Konto</translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -483,6 +483,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation>Deleted User</translation>
|
<translation>Deleted User</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -483,6 +483,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation>Usuario borrado</translation>
|
<translation>Usuario borrado</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -483,6 +483,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -483,6 +483,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation>Supprimer l'utilisateur</translation>
|
<translation>Supprimer l'utilisateur</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -473,6 +473,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -483,6 +483,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -493,6 +493,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation>Usunięty użytkownik</translation>
|
<translation>Usunięty użytkownik</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -493,6 +493,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation>Удалённый пользователь</translation>
|
<translation>Удалённый пользователь</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -493,6 +493,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation>Odstránený používateľ</translation>
|
<translation>Odstránený používateľ</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -483,6 +483,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation>Tog bort användare</translation>
|
<translation>Tog bort användare</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -473,6 +473,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
|
@ -483,6 +483,10 @@
|
||||||
<source>Deleted User</source>
|
<source>Deleted User</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Double-tap on a message to choose a reaction</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatSelectionPage</name>
|
<name>ChatSelectionPage</name>
|
||||||
|
|
Loading…
Reference in a new issue