~nskaggs/ubuntu-rssreader-app/disable-osk-during-tests

« back to all changes in this revision

Viewing changes to feeds/AppendFeedPage.qml

  • Committer: Tarmac
  • Author(s): Roman Shchekin
  • Date: 2013-09-01 15:05:59 UTC
  • mfrom: (51.2.1 search-feed-fix)
  • Revision ID: tarmac-20130901150559-qm71y9bqyn7r4qs0
Fix for https://bugs.launchpad.net/ubuntu-rssreader-app/+bug/1217359.

Approved by Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    property bool isDirty: false // Need to clear all page content.
19
19
    property int selectedCount: 0
20
20
    property var selectedFeeds: null
21
 
 
 
21
    property bool resultsReceived: false
22
22
 
23
23
    tools: ToolbarItems {
24
24
        id: appendFeedTools
79
79
 
80
80
    function reloadPageContent() {
81
81
        if (isDirty) {
82
 
            // isUrlEntered = false
83
82
            tfFeedUrl.text = ""
 
83
            resultsReceived = false
84
84
            clearModelDependData()
85
85
        }
86
86
        isDirty = false
100
100
        target: googleFeedApi
101
101
 
102
102
        onFindResult: {
 
103
            resultsReceived = true
 
104
 
103
105
            if ( result.responseStatus !== 200 ) {
104
106
                // TODO Make more detailed error message
105
107
 
127
129
        }
128
130
 
129
131
        onLoadResult: {
 
132
            resultsReceived = true
 
133
 
130
134
            if ( result.responseStatus !== 200 ) {
131
135
                // TODO Make more detailed error message
132
136
 
180
184
            onAccepted: {
181
185
                var userInput = text
182
186
 
 
187
                if (userInput == "")
 
188
                    return
 
189
 
183
190
                // Very simple logic, no spaces and contains dots.
184
191
                // TODO replace with regexp.
185
192
                var isUrlEntered = (userInput.indexOf(" ") === -1 && userInput.indexOf(".") !== -1)
234
241
    }
235
242
 
236
243
    Label {
237
 
        visible: searchResultsModel.count == 0
 
244
        visible: searchResultsModel.count == 0 && resultsReceived
238
245
        anchors.centerIn: parent
239
246
        text: i18n.tr("No feeds")
240
247
        fontSize: "large"