MOBILE-2903 menu: Show 5 items max on phones

This commit is contained in:
Pau Ferrer Ocaña 2019-05-14 09:52:49 +02:00
parent 12d75f14b2
commit 8f0032bb7b

View File

@ -178,6 +178,9 @@ export class CoreMainMenuProvider {
numElements = Math.floor(window.innerHeight / CoreMainMenuProvider.ITEM_MIN_WIDTH);
} else {
numElements = Math.floor(window.innerWidth / CoreMainMenuProvider.ITEM_MIN_WIDTH);
// Set a maximum elements to show and skip more button.
numElements = numElements >= 5 ? 5 : numElements;
}
// Set a mínimum elements to show and skip more button.