aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-10-24 20:58:25 +0200
committerMario Vavti <mario@mariovavti.com>2018-10-24 20:58:25 +0200
commit5c4fbbebe1bd633e30a907b4a188d04c2f2f4fb0 (patch)
tree62571dcc8ca41b96af64bfca4f61dba8eef689c4 /Zotlabs/Widget
parent615402ea83e0ff3fa4b92a1e50ef40f8d18d61f5 (diff)
downloadvolse-hubzilla-5c4fbbebe1bd633e30a907b4a188d04c2f2f4fb0.tar.gz
volse-hubzilla-5c4fbbebe1bd633e30a907b4a188d04c2f2f4fb0.tar.bz2
volse-hubzilla-5c4fbbebe1bd633e30a907b4a188d04c2f2f4fb0.zip
refine stream filter and forum notification behaviour (mostly for performance). personal posts will be displayed in unthreaded mode and clicking a forum notification will show only the unseen items of the forum in unthreaded mode. group the filters in the widget - threaded at the top, unthreaded beneath.
Diffstat (limited to 'Zotlabs/Widget')
-rw-r--r--Zotlabs/Widget/Activity_filter.php59
-rw-r--r--Zotlabs/Widget/Activity_order.php4
2 files changed, 32 insertions, 31 deletions
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index 4ea0086dd..32ab10c77 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -16,35 +16,6 @@ class Activity_filter {
$tabs = [];
- if(feature_enabled(local_channel(),'personal_tab')) {
- if(x($_GET,'conv')) {
- $conv_active = (($_GET['conv'] == 1) ? 'active' : '');
- $filter_active = 'personal';
- }
-
- $tabs[] = [
- 'label' => t('Personal Posts'),
- 'icon' => 'user-circle',
- 'url' => z_root() . '/' . $cmd . '/?f=&conv=1',
- 'sel' => $conv_active,
- 'title' => t('Show posts that mention or involve me')
- ];
- }
-
- if(feature_enabled(local_channel(),'star_posts')) {
- if(x($_GET,'star')) {
- $starred_active = (($_GET['star'] == 1) ? 'active' : '');
- $filter_active = 'star';
- }
-
- $tabs[] = [
- 'label' => t('Starred Posts'),
- 'icon' => 'star',
- 'url'=>z_root() . '/' . $cmd . '/?f=&star=1',
- 'sel'=>$starred_active,
- 'title' => t('Show posts that I have starred')
- ];
- }
if(Apps::system_app_installed(local_channel(), 'Privacy Groups')) {
$groups = q("SELECT * FROM pgrp WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
@@ -110,6 +81,36 @@ class Activity_filter {
}
}
+ if(feature_enabled(local_channel(),'star_posts')) {
+ if(x($_GET,'star')) {
+ $starred_active = (($_GET['star'] == 1) ? 'active' : '');
+ $filter_active = 'star';
+ }
+
+ $tabs[] = [
+ 'label' => t('Starred Posts'),
+ 'icon' => 'star',
+ 'url'=>z_root() . '/' . $cmd . '/?f=&star=1',
+ 'sel'=>$starred_active,
+ 'title' => t('Show posts that I have starred')
+ ];
+ }
+
+ if(feature_enabled(local_channel(),'personal_tab')) {
+ if(x($_GET,'conv')) {
+ $conv_active = (($_GET['conv'] == 1) ? 'active' : '');
+ $filter_active = 'personal';
+ }
+
+ $tabs[] = [
+ 'label' => t('Personal Posts'),
+ 'icon' => 'user-circle',
+ 'url' => z_root() . '/' . $cmd . '/?f=&conv=1',
+ 'sel' => $conv_active,
+ 'title' => t('Show posts that mention or involve me')
+ ];
+ }
+
if(feature_enabled(local_channel(),'filing')) {
$terms = q("select distinct term from term where uid = %d and ttype = %d order by term asc",
intval(local_channel()),
diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php
index 1cba1ce8c..d3fe2a30f 100644
--- a/Zotlabs/Widget/Activity_order.php
+++ b/Zotlabs/Widget/Activity_order.php
@@ -54,8 +54,8 @@ class Activity_order {
}
}
- // override order for search, filer and cid results
- if(x($_GET,'search') || x($_GET,'file') || (! x($_GET,'pf') && x($_GET,'cid')) || x($_GET,'verb') || x($_GET,'tag') || x($_GET,'cat')) {
+ // override order for some filter results
+ if(x($_GET,'search') || x($_GET,'file') || (! x($_GET,'pf') && x($_GET,'cid')) || x($_GET,'verb') || x($_GET,'tag') || x($_GET,'cat') || x($_GET,'conv') || x($_GET,'unseen')) {
$unthreaded_active = 'active';
$commentord_active = $postord_active = 'disabled';
}