Add option to disable automatic switching to compact shoppinglist view on mobile devices (#551)

This commit is contained in:
Marc Ole Bulling 2020-02-09 15:25:54 +01:00 committed by GitHub
parent e9f55de987
commit a0ab5c5e94
2 changed files with 2 additions and 1 deletions

View File

@ -97,6 +97,7 @@ DefaultUserSetting('scan_mode_purchase_enabled', false);
# Shopping list settings
DefaultUserSetting('shopping_list_to_stock_workflow_auto_submit_when_prefilled', false); // Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set
DefaultUserSetting('shopping_list_show_calendar', false);
DefaultUserSetting('shopping_list_disable_auto_compact_view', false);
# Chores settings
DefaultUserSetting('chores_due_soon_days', 5);

View File

@ -384,7 +384,7 @@ if (window.location.hash === "#compact")
}
// Auto switch to compact view on mobile
if ($(window).width() < 768 & window.location.hash !== "#compact")
if ($(window).width() < 768 & window.location.hash !== "#compact" && !BoolVal(Grocy.UserSettings.shopping_list_disable_auto_compact_view))
{
$("#shopping-list-compact-view-button").click();
}