-
- $(this).parents(".inbox-row, .inbox-row-unread").fadeOut(800, "linear", function () {
- $(this).remove();
- });
- });
+ $("#outbox-count").replaceWith(data.outbox_count);
+ $("#muted-count").replaceWith(data.muted_count);
+ }
+
+ function updateReadState(target, isRead) {
+ $(target).closest("tr")
+ .toggleClass("inbox-row", isRead)
+ .toggleClass("inbox-row-unread", !isRead)
+ .find(".inbox-mark-unread").prop("hidden", !isRead).end()
+ .find(".inbox-mark-read").prop("hidden", isRead);
+ }