From 51038b0c02d934ae14a94fddeb9d889acdc8d6d0 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 5 Jun 2020 11:03:18 -0600 Subject: [PATCH] Replace math hacks with temporary placeholder --- src/components/views/rooms/RoomSublist2.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/views/rooms/RoomSublist2.tsx b/src/components/views/rooms/RoomSublist2.tsx index e20a36d6ce..dd0d591c53 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -222,11 +222,8 @@ export default class RoomSublist2 extends React.Component { handles = []; // no handles, we're at a minimum } - // TODO: Remove Math hacks - let nVisible = Math.floor(layout.visibleTiles); - if (localStorage.getItem("mx_rl_mathfn")) { - nVisible = Math[localStorage.getItem("mx_rl_mathfn")](layout.visibleTiles); - } + // TODO: This might need adjustment, however for now it is fine as a round. + const nVisible = Math.round(layout.visibleTiles); const visibleTiles = tiles.slice(0, nVisible); // If we're hiding rooms, show a 'show more' button to the user. This button @@ -242,6 +239,7 @@ export default class RoomSublist2 extends React.Component { // TODO: CSS TBD // TODO: Make this an actual tile + // TODO: This is likely to pop out of the list, consider that. visibleTiles.splice(visibleTiles.length - 1, 1, (