From e93a41c5fb654fc09d6a97644185154f0ee55a26 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 5 Jun 2020 13:14:44 -0600 Subject: [PATCH] Minor clarity --- src/components/views/rooms/RoomSublist2.tsx | 1 + src/stores/room-list/ListLayout.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomSublist2.tsx b/src/components/views/rooms/RoomSublist2.tsx index dd0d591c53..d3bb19729d 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -235,6 +235,7 @@ export default class RoomSublist2 extends React.Component { // we have a cutoff condition - add the button to show all // we +1 to account for the room we're about to hide with our 'show more' button + // this results in the button always being 1+, and not needing an i18n `count`. const numMissing = (tiles.length - visibleTiles.length) + 1; // TODO: CSS TBD diff --git a/src/stores/room-list/ListLayout.ts b/src/stores/room-list/ListLayout.ts index fd57a03ca1..b41d56be3e 100644 --- a/src/stores/room-list/ListLayout.ts +++ b/src/stores/room-list/ListLayout.ts @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +import { TagID } from "./models"; + const TILE_HEIGHT_PX = 34; interface ISerializedListLayout { @@ -23,7 +25,7 @@ interface ISerializedListLayout { export class ListLayout { private _n = 0; - constructor(public readonly tagId) { + constructor(public readonly tagId: TagID) { const serialized = localStorage.getItem(this.key); if (serialized) { // We don't use the setters as they cause writes.