Remove duplicate definitions of DiffViewMode
Also move the enum to the API and re-export it in constants/.
Change-Id: I469ceb2d588a9a7b79df42ffc55ea4d5ce5d1057
diff --git a/polygerrit-ui/app/constants/constants.ts b/polygerrit-ui/app/constants/constants.ts
index 50be7ee..14e57e4 100644
--- a/polygerrit-ui/app/constants/constants.ts
+++ b/polygerrit-ui/app/constants/constants.ts
@@ -18,6 +18,7 @@
/**
* @desc Tab names for primary tabs on change view page.
*/
+import {DiffViewMode} from '../api/diff';
import {DiffPreferencesInfo} from '../types/diff';
import {EditPreferencesInfo, PreferencesInfo} from '../types/common';
@@ -291,14 +292,7 @@
HHMM_24 = 'HHMM_24',
}
-/**
- * Diff type in preferences
- * https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#preferences-input
- */
-export enum DiffViewMode {
- SIDE_BY_SIDE = 'SIDE_BY_SIDE',
- UNIFIED = 'UNIFIED_DIFF',
-}
+export {DiffViewMode};
/**
* The type of email strategy to use.