]> git.mxchange.org Git - friendica.git/commitdiff
Add smart_threading user setting
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 19 Nov 2017 05:57:31 +0000 (00:57 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 19 Nov 2017 05:57:31 +0000 (00:57 -0500)
mod/settings.php
view/templates/settings_display.tpl
view/theme/frio/templates/settings_display.tpl

index c0b3d2cc16082f5721a161b61f412e9010efc988..bc6425171c9707e3ff8514d49e8c521231776546 100644 (file)
@@ -303,6 +303,7 @@ function settings_post(App $a) {
                $infinite_scroll   = x($_POST, 'infinite_scroll')   ? intval($_POST['infinite_scroll'])    : 0;
                $no_auto_update    = x($_POST, 'no_auto_update')    ? intval($_POST['no_auto_update'])     : 0;
                $bandwidth_saver   = x($_POST, 'bandwidth_saver')   ? intval($_POST['bandwidth_saver'])    : 0;
+               $smart_threading   = x($_POST, 'smart_threading')   ? intval($_POST['smart_threading'])    : 0;
                $nowarn_insecure   = x($_POST, 'nowarn_insecure')   ? intval($_POST['nowarn_insecure'])    : 0;
                $browser_update    = x($_POST, 'browser_update')    ? intval($_POST['browser_update'])     : 0;
                if ($browser_update != -1) {
@@ -335,6 +336,7 @@ function settings_post(App $a) {
                PConfig::set(local_user(), 'system', 'infinite_scroll'         , $infinite_scroll);
                PConfig::set(local_user(), 'system', 'no_auto_update'          , $no_auto_update);
                PConfig::set(local_user(), 'system', 'bandwidth_saver'         , $bandwidth_saver);
+               PConfig::set(local_user(), 'system', 'smart_threading'         , $smart_threading);
 
                if ($theme == $a->user['theme']) {
                        // call theme_post only if theme has not been changed
@@ -989,6 +991,7 @@ function settings_content(App $a) {
                $infinite_scroll = PConfig::get(local_user(), 'system', 'infinite_scroll', 0);
                $no_auto_update = PConfig::get(local_user(), 'system', 'no_auto_update', 0);
                $bandwidth_saver = PConfig::get(local_user(), 'system', 'bandwidth_saver', 0);
+               $smart_threading = PConfig::get(local_user(), 'system', 'smart_threading', 0);
 
                $theme_config = "";
                if (($themeconfigfile = get_theme_config_file($theme_selected)) != null) {
@@ -1017,6 +1020,7 @@ function settings_content(App $a) {
                        '$infinite_scroll'      => array('infinite_scroll', t("Infinite scroll"), $infinite_scroll, ''),
                        '$no_auto_update'       => array('no_auto_update', t("Automatic updates only at the top of the network page"), $no_auto_update, t('When disabled, the network page is updated all the time, which could be confusing while reading.')),
                        '$bandwidth_saver' => array('bandwidth_saver', t('Bandwith Saver Mode'), $bandwidth_saver, t('When enabled, embedded content is not displayed on automatic updates, they only show on page reload.')),
+                       '$smart_threading' => array('smart_threading', t('Smart Threading'), $smart_threading, t('When enabled, suppress extraneous thread indentation while keeping it where it matters. Only works if threading is available and enabled.')),
 
                        '$d_tset' => t('General Theme Settings'),
                        '$d_ctset' => t('Custom Theme Settings'),
index ef2091035f9cfed2a6ac8dff57d33e6ca1d8ad78..ff3e4fba6e22b130a03d74e30ac84ee099e85180 100644 (file)
@@ -20,6 +20,7 @@
 {{include file="field_checkbox.tpl" field=$noinfo}}
 {{include file="field_checkbox.tpl" field=$infinite_scroll}}
 {{include file="field_checkbox.tpl" field=$bandwidth_saver}}
+{{include file="field_checkbox.tpl" field=$smart_threading}}
 <h2>{{$calendar_title}}</h2>
 {{include file="field_select.tpl" field=$first_day_of_week}}
 
index 177fa6311701f8c6a1b6eaa5df6b2c4a7c7eafc9..cc36762dc9aa1cabd0f83154cacb58085b78175c 100644 (file)
@@ -75,6 +75,7 @@
                                                {{include file="field_checkbox.tpl" field=$noinfo}}
                                                {{include file="field_checkbox.tpl" field=$infinite_scroll}}
                                                {{include file="field_checkbox.tpl" field=$bandwidth_saver}}
+                                               {{include file="field_checkbox.tpl" field=$smart_threading}}
 
                                                <div class="form-group pull-right settings-submit-wrapper" >
                                                        <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>