File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/components/viewmodels/roomlist Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -27,35 +27,35 @@ function getRoomsWithStickyRoom(
27
27
) : { newRooms : Room [ ] ; newIndex : number | undefined } {
28
28
const updated = { newIndex, newRooms : rooms } ;
29
29
if ( isRoomChange ) {
30
- /**
30
+ /*
31
31
* When opening another room, the index should obviously change.
32
32
*/
33
33
return updated ;
34
34
}
35
35
if ( newIndex === undefined || oldIndex === undefined ) {
36
- /**
36
+ /*
37
37
* If oldIndex is undefined, then there was no active room before.
38
38
* So nothing to do in regards to sticky room.
39
39
* Similarly, if newIndex is undefined, there's no active room anymore.
40
40
*/
41
41
return updated ;
42
42
}
43
43
if ( newIndex === oldIndex ) {
44
- /**
44
+ /*
45
45
* If the index hasn't changed, we have nothing to do.
46
46
*/
47
47
return updated ;
48
48
}
49
49
if ( oldIndex > rooms . length - 1 ) {
50
- /**
50
+ /*
51
51
* If the old index falls out of the bounds of the rooms array
52
52
* (usually because rooms were removed), we can no longer place
53
53
* the active room in the same old index.
54
54
*/
55
55
return updated ;
56
56
}
57
57
58
- /**
58
+ /*
59
59
* Making the active room sticky is as simple as removing it from
60
60
* its new index and placing it in the old index.
61
61
*/
You can’t perform that action at this time.
0 commit comments