update unseen sequence after display
[mmh] / uip / mhshow.c
index 6978454..2a62777 100644 (file)
@@ -301,8 +301,6 @@ main(int argc, char **argv)
                        if (is_selected(mp, msgnum))
                                set_unseen(mp, msgnum);
 
-               seq_setunseen(mp, 0);  /* unset unseen seqs for shown msgs */
-
                cts = mh_xcalloc(mp->numsel + 1, sizeof(*cts));
                ctp = cts;
 
@@ -363,6 +361,8 @@ main(int argc, char **argv)
 
        /* If reading from a folder, do some updating */
        if (mp) {
+               seq_read(mp);
+               seq_setunseen(mp, 0);  /* unset unseen seqs for shown msgs */
                context_replace(curfolder, folder); /* update current folder */
                seq_setcur(mp, mp->hghsel);        /* update current message */
                seq_save(mp);                      /* synchronize sequences */