First unread post

Discussion in 'Developer Support' started by Dumdidum, Aug 23, 2010.

  1. Dumdidum Member

    Hi

    Do you plan to introduce a feature to get the reply number of the first unread post in a topic, given a Username?

    We would like to jump to the first unread post, but as we are not loading all post of a thread, only 10 post/page, it would be nice to know which reply# the first unread post has.

    Can it be done somehow?

    Thanks a lot

    Sven
  2. Yao Android Developer

    Hi Dumdidum,

    We already implement this in latest vb plugin(1.7.5 for 3.7,3.8/1.2.5 for vb 4.0)

    Here are two new APIs.

    get_thread_by_unread(String threadid, int perpage)
    get_thread_by_unread(String threadid) //default 20 per page

    get_thread_by_unread(String postid, int perpage)
    get_thread_by_unread(String postid) //default 20 per page

    Also add new key "position" in response, it will position for specific post or first unread position. For example, if 10 post/page and the 4th post in second page is first unread, position should 14.

    Thanks
    Yao
  3. Dumdidum Member

    hi Yao

    Great, seems to work great!
    A followup-question: Would it be possible to add a new key to the response of a get_thread / get_thread_by_unread, for each post, if that post ist unread or not?

    So if I load posts using get_thread, that I can mark the unread posting?

    Thanks!
  4. Yao Android Developer

    #1, so far can not get flag for unread status for each post, vb can not track so much information. And I think postion is enough for most of situation

    #2, yes, get_thread/get_thread_by_unread/get_thread_by_post all will mark thread read.