~marcinello/ubuntu-rssreader-app/fix-1297463

« back to all changes in this revision

Viewing changes to TopicTab.qml

Correct clean-up implemented.

Approved by Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
    function reload() {
27
27
        // console.log('TopicTab reload', topicId)
28
 
        isActive = false
29
 
        commonModel.clear()
 
28
        clear()
 
29
 
30
30
        var articlesByTopic = []
31
 
 
32
31
        var topicArticles = DB.loadArticles({"tagId" : topicId})
33
32
 
34
33
        for (var j = 0; j < topicArticles.rows.length; j++) {
65
64
            commonModel.append(articlesByTopic[i])
66
65
    }
67
66
 
 
67
    function clear() {
 
68
        isActive = false
 
69
        gridPage.clear()
 
70
        listPage.clear()
 
71
        commonModel.clear()
 
72
    }
 
73
 
68
74
    function showContent() {
69
75
        console.log("showContent: ", topicId, isActive)
70
76
        if (isActive)