Exemplo n.º 1
0
def set_is_read(url):
    feeds_lists = FeedsList.get_feeds_lists_in_json()
    for feeds_list in feeds_lists:
        for index, feed in enumerate(feeds_list.feeds):
            if feed["url"] == url:
                feeds_list.feeds[index]["is_read"] = True
                FeedsList.write_feeds_lists_in_json(feeds_lists)
                return
Exemplo n.º 2
0
def add_new_feedslist(my_app, noticer, feed_num, progress_dialog=None):
    Noticer.add_noticer(noticer)

    # my_thread = MyThread("add_feeds_list_thread", FeedsList.add_feeds_list, noticer, feed_num, progress_dialog)
    # my_thread.start()

    FeedsList.add_feeds_list(noticer, feed_num, progress_dialog)

    use_qml_fun(my_app.root_view, fun_parent_name="rect", fun_name="add_new_feedslist",
                args={"feeds_list": FeedsList.get_feeds_list(noticer.name), "notice_methods": noticer.notice_methods})

    listview.load_noticers_listview(my_app.root_view)
Exemplo n.º 3
0
def load_noticers_listview(root_view):
    noticers = Noticer.get_noticers_in_json()
    noticers_names = list()
    unread_nums = list()

    feedslists = FeedsList.get_feeds_lists_in_json()
    feedslists_processed = []

    set_noticers_data(noticers_names, unread_nums, feedslists_processed, noticers, feedslists)

    use_qml_fun(root_view, fun_parent_name="rect", fun_name="updateNoticersList",
                args={"names": noticers_names, "unread_nums": unread_nums, "feedslists": feedslists_processed})
Exemplo n.º 4
0
def del_noticer(root_view):
    Noticer.del_noticer(root_view)
    name = Noticer.get_current_noticer_name(root_view)
    FeedsList.del_feeds_list(name)

    listview.load_noticers_listview(root_view)