~qqworini/ubuntu-rssreader-app/notification-bar

« back to all changes in this revision

Viewing changes to RssFeedPage.qml

  • Committer: Joey Chan
  • Date: 2013-10-07 15:56:50 UTC
  • Revision ID: qqworini@gmail.com-20131007155650-u6l9hfrngfnu17dh
Notification bar implemented

a nice notification bar placed on the top of the whole app, multi notification can be shown at the same time, it will automaticaly disappear in 3 seconds by default, also user can click the notification to destroy it

how to use: mainView.addNotification("notification", time),  nothing else

example: click an article, go to article page, swipe up, click "Save". Or, if u want to click it hundred times to show hundred notifications

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
                            rssItem.status = "0"
83
83
                        }
84
84
                        mainView.refreshSavedTab()
 
85
                        if (fav == "1")
 
86
                            mainView.addNotification(i18n.tr("Article Saved"))
 
87
                        else
 
88
                            mainView.addNotification(i18n.tr("Article Removed"))
85
89
                    }
 
90
                    else
 
91
                        mainView.addNotification(i18n.tr("Oops.. Something go wrong"))
86
92
                }
87
93
            }
88
94
        }