diff options
author | André Luís <aluis@gitlab.com> | 2018-10-10 19:53:17 +0300 |
---|---|---|
committer | André Luís <aluis@gitlab.com> | 2018-10-12 01:33:38 +0300 |
commit | 52cf955b898ce53d76bf0da83a36bb2579986e5f (patch) | |
tree | 023e1d123dda412dc278ffaa2fadd8873c859dbd /app/assets/javascripts/diffs/store/modules/diff_state.js | |
parent | 8f13e0710cb457a17fceeb4e87c2efdd2df8ae19 (diff) |
Improve MR file tree on small screens
Diffstat (limited to 'app/assets/javascripts/diffs/store/modules/diff_state.js')
-rw-r--r-- | app/assets/javascripts/diffs/store/modules/diff_state.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/diffs/store/modules/diff_state.js b/app/assets/javascripts/diffs/store/modules/diff_state.js index ae8930c8968..1c5c35071de 100644 --- a/app/assets/javascripts/diffs/store/modules/diff_state.js +++ b/app/assets/javascripts/diffs/store/modules/diff_state.js @@ -1,5 +1,6 @@ import Cookies from 'js-cookie'; import { getParameterValues } from '~/lib/utils/url_utility'; +import bp from '~/breakpoints'; import { INLINE_DIFF_VIEW_TYPE, DIFF_VIEW_COOKIE_NAME, MR_TREE_SHOW_KEY } from '../../constants'; const viewTypeFromQueryString = getParameterValues('view')[0]; @@ -20,6 +21,7 @@ export default () => ({ diffViewType: viewTypeFromQueryString || viewTypeFromCookie || defaultViewType, tree: [], treeEntries: {}, - showTreeList: storedTreeShow === null ? true : storedTreeShow === 'true', + showTreeList: + storedTreeShow === null ? bp.getBreakpointSize() !== 'xs' : storedTreeShow === 'true', currentDiffFileId: '', }); |