Commit 7d55d0b1 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(mark_as_read): Send async-text-read.

(mark_as_unread): Send async-invalidate-text-read.
(set_read_ranges): Ditto.
(set_unread): Ditto.
(set_last_read): Ditto.
parent 56396484
/*
* $Id: membership.c,v 0.96 2003/08/28 23:13:06 ceder Exp $
* $Id: membership.c,v 0.97 2004/07/18 20:44:25 ceder Exp $
* Copyright (C) 1991-2003 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -1578,10 +1578,12 @@ mark_as_read (Conf_no conference,
add_rec_time(conf_c, lno, ACTPERS);
/* Update the Membership struct */
if (insert_loc_no(lno, m) == OK
&& active_connection->cwc == conference)
if (insert_loc_no(lno, m) == OK)
{
++ACT_P->read_texts;
async_text_read(active_connection, conference, lno);
if (active_connection->cwc == conference)
++ACT_P->read_texts;
}
}
......@@ -1644,6 +1646,7 @@ mark_as_unread(Conf_no conference,
{
remove_loc_no(lno, m);
adjust_read(m, conf_c);
async_invalidate_text_read(active_connection, conference);
mark_person_as_changed(ACTPERS);
}
......@@ -1733,6 +1736,7 @@ set_read_ranges(Conf_no conference,
sfree(m->read_ranges);
m->read_ranges = NULL;
m->no_of_read_ranges = 0;
async_invalidate_text_read(active_connection, conference);
mark_person_as_changed(ACTPERS);
}
}
......@@ -1755,6 +1759,7 @@ set_read_ranges(Conf_no conference,
memcpy(m->read_ranges, read_ranges->ranges,
m->no_of_read_ranges * sizeof(m->read_ranges[0]));
adjust_read(m, conf_c);
async_invalidate_text_read(active_connection, conference);
mark_person_as_changed(ACTPERS);
}
......@@ -2120,6 +2125,7 @@ set_unread (Conf_no conf_no,
mship->no_of_read_ranges = 0;
}
async_invalidate_text_read(active_connection, conf_no);
mark_person_as_changed(ACTPERS);
return OK;
}
......@@ -2168,6 +2174,7 @@ set_last_read (Conf_no conf_no,
mship->no_of_read_ranges = 0;
}
async_invalidate_text_read(active_connection, conf_no);
mark_person_as_changed(ACTPERS);
return OK;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment