diff options
author | Phil Hughes <me@iamphill.com> | 2019-03-19 14:34:21 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-03-19 14:34:21 +0300 |
commit | 27fa7b9ca897c77e45878f3fecb7debe8f8cd64c (patch) | |
tree | 94a9ccb7ef7f4bd2ba7904d3b833e2d2f96adedb /app/assets/javascripts/diffs/store/modules | |
parent | a52d7dfaa9b72e4442a1723d30b84bc349b27215 (diff) |
Collapse diff tree is only one file is present
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53139
Diffstat (limited to 'app/assets/javascripts/diffs/store/modules')
-rw-r--r-- | app/assets/javascripts/diffs/store/modules/diff_state.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/assets/javascripts/diffs/store/modules/diff_state.js b/app/assets/javascripts/diffs/store/modules/diff_state.js index 47f78a5db54..cf4dd93dbfb 100644 --- a/app/assets/javascripts/diffs/store/modules/diff_state.js +++ b/app/assets/javascripts/diffs/store/modules/diff_state.js @@ -1,13 +1,10 @@ import Cookies from 'js-cookie'; import { getParameterValues } from '~/lib/utils/url_utility'; -import bp from '~/breakpoints'; -import { parseBoolean } from '~/lib/utils/common_utils'; -import { INLINE_DIFF_VIEW_TYPE, DIFF_VIEW_COOKIE_NAME, MR_TREE_SHOW_KEY } from '../../constants'; +import { INLINE_DIFF_VIEW_TYPE, DIFF_VIEW_COOKIE_NAME } from '../../constants'; const viewTypeFromQueryString = getParameterValues('view')[0]; const viewTypeFromCookie = Cookies.get(DIFF_VIEW_COOKIE_NAME); const defaultViewType = INLINE_DIFF_VIEW_TYPE; -const storedTreeShow = localStorage.getItem(MR_TREE_SHOW_KEY); export default () => ({ isLoading: true, @@ -23,8 +20,7 @@ export default () => ({ diffViewType: viewTypeFromQueryString || viewTypeFromCookie || defaultViewType, tree: [], treeEntries: {}, - showTreeList: - storedTreeShow === null ? bp.getBreakpointSize() !== 'xs' : parseBoolean(storedTreeShow), + showTreeList: true, currentDiffFileId: '', projectPath: '', commentForms: [], |