Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 51038b0

Browse files
committed
Replace math hacks with temporary placeholder
1 parent 1f11298 commit 51038b0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/components/views/rooms/RoomSublist2.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,8 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
222222
handles = []; // no handles, we're at a minimum
223223
}
224224

225-
// TODO: Remove Math hacks
226-
let nVisible = Math.floor(layout.visibleTiles);
227-
if (localStorage.getItem("mx_rl_mathfn")) {
228-
nVisible = Math[localStorage.getItem("mx_rl_mathfn")](layout.visibleTiles);
229-
}
225+
// TODO: This might need adjustment, however for now it is fine as a round.
226+
const nVisible = Math.round(layout.visibleTiles);
230227
const visibleTiles = tiles.slice(0, nVisible);
231228

232229
// 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<IProps, IState> {
242239

243240
// TODO: CSS TBD
244241
// TODO: Make this an actual tile
242+
// TODO: This is likely to pop out of the list, consider that.
245243
visibleTiles.splice(visibleTiles.length - 1, 1, (
246244
<div
247245
onClick={this.onShowAllClick}

0 commit comments

Comments
 (0)