Commit 15b58c0b authored by Volker Krause's avatar Volker Krause
Browse files

Fix encouragements from QML

parent 539c023b
......@@ -460,6 +460,9 @@ void Provider::setProductIdentifier(const QString &productId)
d->storeOne(QStringLiteral("ApplicationStartCount"), d->startCount);
emit providerSettingsChanged();
d->scheduleEncouragement();
d->scheduleNextSubmission();
}
QUrl Provider::feedbackServer() const
......
......@@ -41,6 +41,9 @@ ApplicationWindow {
submissionInterval: 1
productIdentifier: "org.kde.orwell"
feedbackServer: "https://feedback.volkerkrause.eu/"
applicationStartsUntilEncouragement: 5
encouragementDelay: 10
encouragementInterval: 1
// TODO make configurable
statisticsCollectionMode: UserFeedback.Provider.DetailedUsageStatistics
surveyInterval: 0
......@@ -50,6 +53,10 @@ ApplicationWindow {
surveyPopup.surveyInfo = survey;
surveyPopup.open();
}
onShowEncouragementMessage: {
console.log("showing encouragement");
encouragementPopup.open();
}
UserFeedback.ApplicationVersionSource { mode: UserFeedback.Provider.BasicSystemInformation }
UserFeedback.CompilerInfoSource { mode: UserFeedback.Provider.BasicSystemInformation }
......@@ -188,4 +195,36 @@ ApplicationWindow {
}
}
}
Popup {
id: encouragementPopup
x: 0
y: 0
width: parent.width
height: parent.height
ColumnLayout {
anchors.fill: parent
Label {
text: qsTr("Help us make this application better!");
Layout.fillWidth: true
horizontalAlignment: Qt.AlignHCenter;
font.bold: true
}
Label {
Layout.fillWidth: true
text: qsTr("You can help us improving this application by sharing statistics and participate in surveys.")
wrapMode: Text.WordWrap
}
Button {
Layout.alignment: Qt.AlignHCenter;
text: qsTr("Contribute...")
onClicked: {
encouragementPopup.close();
if (!contributePage.visible)
stackView.push(contributePage);
}
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment