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
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})