fix timeago updates, reset unseen counts on channel page, don't set nav selected on profile page

This commit is contained in:
friendica 2013-01-05 16:37:32 -08:00
parent 472a905731
commit f01d785aae
3 changed files with 10 additions and 11 deletions

View File

@ -330,7 +330,7 @@ function updateConvItems(mode,data) {
$(this).attr('src',$(this).attr('dst'));
});
$('#' + prev).after($(this));
$("abbr.wall-item-ago-time").timeago();
$("div.wall-item-ago-time").timeago();
// divgrow doesn't prevent itself from attaching a second (or 500th)
// "show more" div to a content region - it also has a few other
// issues related to how we're trying to use it.
@ -342,7 +342,7 @@ function updateConvItems(mode,data) {
$(this).attr('src',$(this).attr('dst'));
});
$('#' + ident).replaceWith($(this));
$("abbr.wall-item-ago-time").timeago();
$("div.wall-item-ago-time").timeago();
// $("div.wall-item-body").divgrow({ initialHeight: 400 });
}
@ -359,7 +359,7 @@ function updateConvItems(mode,data) {
$(this).attr('src',$(this).attr('dst'));
});
$('#threads-end').before($(this));
$("abbr.wall-item-ago-time").timeago();
$("div.wall-item-ago-time").timeago();
// $("div.wall-item-body").divgrow({ initialHeight: 400 });
}
@ -368,7 +368,7 @@ function updateConvItems(mode,data) {
$(this).attr('src',$(this).attr('dst'));
});
$('#' + ident).replaceWith($(this));
$("abbr.wall-item-ago-time").timeago();
$("div.wall-item-ago-time").timeago();
// $("div.wall-item-body").divgrow({ initialHeight: 400 });
}
});
@ -387,7 +387,7 @@ function updateConvItems(mode,data) {
$(this).attr('src',$(this).attr('dst'));
});
$('#' + prev).after($(this));
$("abbr.wall-item-ago-time").timeago();
$("div.wall-item-ago-time").timeago();
// $("div.wall-item-body").divgrow({ initialHeight: 400 });
}
@ -884,7 +884,7 @@ jQuery.timeago.settings.strings = {
};
$("abbr.wall-item-ago-time").timeago();
$("div.wall-item-ago-time").timeago();
//$("div.wall-item-body").divgrow({ initialHeight: 400 });
//reCalcHeight();

View File

@ -75,7 +75,6 @@ function channel_content(&$a, $update = 0, $load = false) {
$o = '';
$is_owner = (((local_user()) && ($a->profile['profile_uid'] == local_user())) ? true : false);
if($update) {
// Ensure we've got a profile owner if updating.
@ -87,6 +86,8 @@ function channel_content(&$a, $update = 0, $load = false) {
}
}
$is_owner = (((local_user()) && ($a->profile['profile_uid'] == local_user())) ? true : false);
$observer = $a->get_observer();
$ob_hash = (($observer) ? $observer['xchan_hash'] : '');
@ -248,6 +249,7 @@ function channel_content(&$a, $update = 0, $load = false) {
if($is_owner) {
dbg(1);
$r = q("UPDATE item SET item_flags = (item_flags ^ %d)
WHERE (item_flags & %d) AND (item_flags & %d) AND uid = %d ",
intval(ITEM_UNSEEN),
@ -256,7 +258,7 @@ function channel_content(&$a, $update = 0, $load = false) {
intval(local_user())
);
}
dbg(0);
$o .= conversation($a,$items,'channel',$update,'client');

View File

@ -65,9 +65,6 @@ function profile_content(&$a, $update = 0) {
$tab = 'profile';
$o = '';
if($a->profile['profile_uid'] == local_user()) {
nav_set_selected('home');
}
$contact = null;
$remote_contact = false;