Skip to content

Commit cc3bcd0

Browse files
committed
Use single * in comments
1 parent 9c6d608 commit cc3bcd0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/viewmodels/roomlist/useStickyRoomList.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,35 +27,35 @@ function getRoomsWithStickyRoom(
2727
): { newRooms: Room[]; newIndex: number | undefined } {
2828
const updated = { newIndex, newRooms: rooms };
2929
if (isRoomChange) {
30-
/**
30+
/*
3131
* When opening another room, the index should obviously change.
3232
*/
3333
return updated;
3434
}
3535
if (newIndex === undefined || oldIndex === undefined) {
36-
/**
36+
/*
3737
* If oldIndex is undefined, then there was no active room before.
3838
* So nothing to do in regards to sticky room.
3939
* Similarly, if newIndex is undefined, there's no active room anymore.
4040
*/
4141
return updated;
4242
}
4343
if (newIndex === oldIndex) {
44-
/**
44+
/*
4545
* If the index hasn't changed, we have nothing to do.
4646
*/
4747
return updated;
4848
}
4949
if (oldIndex > rooms.length - 1) {
50-
/**
50+
/*
5151
* If the old index falls out of the bounds of the rooms array
5252
* (usually because rooms were removed), we can no longer place
5353
* the active room in the same old index.
5454
*/
5555
return updated;
5656
}
5757

58-
/**
58+
/*
5959
* Making the active room sticky is as simple as removing it from
6060
* its new index and placing it in the old index.
6161
*/

0 commit comments

Comments
 (0)