diff options
-rw-r--r-- | Zotlabs/Module/Channel.php | 10 | ||||
-rw-r--r-- | view/js/main.js | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index b7e18f954..dddca16b4 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -249,13 +249,13 @@ class Channel extends \Zotlabs\Web\Controller { } } else { - $r = q("SELECT id AS item_id FROM item + $r = q("SELECT DISTINCT item.parent AS item_id FROM item left join abook on item.author_xchan = abook.abook_xchan - WHERE uid = %d $item_normal - AND item_wall = 1 and item_thread_top = 1 - AND (abook_blocked = 0 or abook.abook_flags is null) + WHERE true and uid = %d $item_normal + AND (abook.abook_blocked = 0 or abook.abook_flags is null) + AND item.item_wall = 1 AND item.item_thread_top AND item.mid = item.parent_mid $sql_extra $sql_extra2 - ORDER BY created DESC, id $pager_sql ", + ORDER BY created DESC $pager_sql ", intval(\App::$profile['profile_uid']) ); } diff --git a/view/js/main.js b/view/js/main.js index 02b0f125c..4a2bae802 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -357,6 +357,7 @@ function closeMenu(theID) { function markRead(notifType) { $.get('ping?f=&markRead='+notifType); $('.' + notifType + '-button').hide(); + sessionStorage.removeItem(notifType + '_notifications_cache'); if(timer) clearTimeout(timer); timer = setTimeout(updateInit,2000); } @@ -436,6 +437,7 @@ function handleNotifications(data) { if(item == 0) { $('.' + index + '-button').fadeOut(); + sessionStorage.removeItem(index + '_notifications_cache'); } else { $('.' + index + '-button').fadeIn(); $('.' + index + '-update').html(item); |