mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 22:46:04 +03:00
Display input once user clicked on Reply.
Signed-off-by: Camila <hello@camila.codes>
This commit is contained in:
parent
b2056187a0
commit
0890a78262
4 changed files with 20 additions and 7 deletions
|
@ -15,6 +15,16 @@ MouseArea {
|
|||
property bool isChatActivity: model.objectType === "chat" || model.objectType === "room" || model.objectType === "call"
|
||||
property bool isTalkReplyPossible: model.conversationToken !== ""
|
||||
|
||||
property bool displayTalkReplyOptions: false
|
||||
Connections {
|
||||
target: activityModel
|
||||
function onDisplayTalkReplyOptions(activityIndex) {
|
||||
if (model.index === activityIndex) {
|
||||
displayTalkReplyOptions = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signal fileActivityButtonClicked(string absolutePath)
|
||||
|
||||
enabled: (model.path !== "" || model.link !== "" || model.isCurrentUserFileActivity === true)
|
||||
|
@ -73,13 +83,12 @@ MouseArea {
|
|||
ActivityItemActions {
|
||||
id: activityActions
|
||||
|
||||
visible: !root.isFileActivityList && model.linksForActionButtons.length > 0
|
||||
visible: !root.isFileActivityList && model.linksForActionButtons.length > 0 && !displayTalkReplyOptions
|
||||
|
||||
Layout.preferredHeight: Style.trayWindowHeaderHeight * 0.85
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 40
|
||||
Layout.bottomMargin: model.links.length > 1 ? 5 : 0
|
||||
Layout.topMargin: isTalkReplyPossible? 48 : 0
|
||||
|
||||
displayActions: model.displayActions
|
||||
objectType: model.objectType
|
||||
|
|
|
@ -133,7 +133,8 @@ RowLayout {
|
|||
|
||||
Loader {
|
||||
id: talkReplyTextFieldLoader
|
||||
active: isChatActivity && isTalkReplyPossible
|
||||
active: isChatActivity && isTalkReplyPossible && displayTalkReplyOptions
|
||||
visible: displayTalkReplyOptions
|
||||
|
||||
anchors.top: activityTextDateTime.bottom
|
||||
anchors.topMargin: 10
|
||||
|
|
|
@ -611,6 +611,12 @@ void ActivityListModel::slotTriggerAction(const int activityIndex, const int act
|
|||
|
||||
const auto action = activity._links[actionIndex];
|
||||
|
||||
// TODO this will change with https://github.com/nextcloud/desktop/issues/4159
|
||||
if (action._verb == "WEB" && action._label == tr("View chat")) {
|
||||
emit displayTalkReplyOptions(activityIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (action._verb == "WEB") {
|
||||
Utility::openBrowser(QUrl(action._link));
|
||||
return;
|
||||
|
@ -832,7 +838,4 @@ QString ActivityListModel::talkReplyMessageSent(const int activityIndex) const
|
|||
|
||||
return _finalList[activityIndex]._talkNotificationData.messageSent;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ signals:
|
|||
void activityJobStatusCode(int statusCode);
|
||||
void sendNotificationRequest(const QString &accountName, const QString &link, const QByteArray &verb, int row);
|
||||
void messageSent();
|
||||
|
||||
void displayTalkReplyOptions(const int activityIndex);
|
||||
|
||||
protected:
|
||||
void setup();
|
||||
|
|
Loading…
Reference in a new issue