~daker/ubuntu-rssreader-app/fix.1217297

« back to all changes in this revision

Viewing changes to XmlNetwork.qml

  • Committer: Roman Shchekin
  • Date: 2013-09-01 14:35:33 UTC
  • mto: This revision was merged to the branch mainline in revision 52.
  • Revision ID: mrqtros@gmail.com-20130901143533-aqeohpuf6qlbt335
Fix for https://bugs.launchpad.net/ubuntu-rssreader-app/+bug/1217300.
A lot of little but extremelly important changes in refresh process.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
    property var feedList: []               // feed list from database
15
15
    property var currentFeed                // current downloading feed
16
16
 
17
 
    signal downloadFinish() // TODO RENAME
 
17
    property int tagId: 0
 
18
 
 
19
    signal downloadFinished(int tagId) // TODO RENAME
18
20
    signal downloadStarted()
19
21
 
20
22
    /* Method updates feeds one by another.
21
23
     * Input: array of objects, each should include
22
24
     * source, link and id (of feed in DB) properties.
23
25
     */
24
 
    function updateFeeds(feedsArray) {
 
26
    function updateFeeds(feedsArray, topicId) {
 
27
        tagId = topicId || 0
 
28
 
25
29
        downloadStarted()
26
30
 
27
31
        feedList = feedsArray
31
35
    // For inner usage only.
32
36
    function updateNextFeed() {
33
37
        if (feedList.length == 0) {
34
 
            downloadFinish()
 
38
            downloadFinished(tagId)
35
39
            return
36
40
        }
37
41
        //var feedArray = feedList
45
49
    function cancelDownload() {
46
50
        feedList = []
47
51
        googleFeedApi.abort()
48
 
        downloadFinish()
 
52
        downloadFinished(tagId)
49
53
    }
50
54
 
51
55
    /* Temporary here - TODO move to separate file.