Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions sailfish/qml/SendLinkPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ import QtQuick 2.0
import Sailfish.Silica 1.0
import harbour.quickddit.Core 1.0

AbstractPage {
Dialog {
id: newLinkPage
title: editPost === "" ? qsTr("New Post") : qsTr("Edit Post")

property string subreddit
property string editPost: ""
Expand Down Expand Up @@ -54,6 +53,11 @@ AbstractPage {
}
}

DialogHeader {
title: editPost === "" ? qsTr("New Post") : qsTr("Edit Post")
acceptText: editPost === "" ? qsTr("Submit") : qsTr("Save")
}

Flickable {
id: flickable
anchors.fill: parent
Expand Down Expand Up @@ -124,17 +128,13 @@ AbstractPage {
}
}
}

Button {
text: editPost === "" ? qsTr("Submit") : qsTr("Save")
anchors.horizontalCenter: parent.horizontalCenter
enabled: (editPost != "" || linkTitle.text.length > 0) /* official limits? */
&& ((selfLinkSwitch.checked && linkDescription.text.length > 0) || (!selfLinkSwitch.checked && linkUrl.acceptableInput))
onClicked: submit()
}
}
}

canAccept: (editPost != "" || linkTitle.text.length > 0) /* official limits? */
&& ((selfLinkSwitch.checked && linkDescription.text.length > 0) || (!selfLinkSwitch.checked && linkUrl.acceptableInput))
onAccepted: submit()

AboutSubredditManager {
id: aboutSubredditManager
manager: quickdditManager
Expand Down