@@ -902,7 +902,7 @@ export default class EventTile extends React.Component<IProps, IState> {
902
902
mx_EventTile_12hr : this . props . isTwelveHour ,
903
903
// Note: we keep the `sending` state class for tests, not for our styles
904
904
mx_EventTile_sending : ! isEditing && isSending ,
905
- mx_EventTile_highlight : this . props . tileShape === 'notif' ? false : this . shouldHighlight ( ) ,
905
+ mx_EventTile_highlight : this . props . tileShape === TileShape . Notif ? false : this . shouldHighlight ( ) ,
906
906
mx_EventTile_selected : this . props . isSelectedEvent ,
907
907
mx_EventTile_continuation : this . props . tileShape ? '' : this . props . continuation ,
908
908
mx_EventTile_last : this . props . last ,
@@ -935,7 +935,7 @@ export default class EventTile extends React.Component<IProps, IState> {
935
935
let avatarSize ;
936
936
let needsSenderProfile ;
937
937
938
- if ( this . props . tileShape === "notif" ) {
938
+ if ( this . props . tileShape === TileShape . Notif ) {
939
939
avatarSize = 24 ;
940
940
needsSenderProfile = true ;
941
941
} else if ( tileHandler === 'messages.RoomCreate' || isBubbleMessage ) {
@@ -949,7 +949,7 @@ export default class EventTile extends React.Component<IProps, IState> {
949
949
} else if ( this . props . layout == Layout . IRC ) {
950
950
avatarSize = 14 ;
951
951
needsSenderProfile = true ;
952
- } else if ( this . props . continuation && this . props . tileShape !== "file_grid" ) {
952
+ } else if ( this . props . continuation && this . props . tileShape !== TileShape . FileGrid ) {
953
953
// no avatar or sender profile for continuation messages
954
954
avatarSize = 0 ;
955
955
needsSenderProfile = false ;
@@ -979,7 +979,11 @@ export default class EventTile extends React.Component<IProps, IState> {
979
979
}
980
980
981
981
if ( needsSenderProfile ) {
982
- if ( ! this . props . tileShape || this . props . tileShape === 'reply' || this . props . tileShape === 'reply_preview' ) {
982
+ if (
983
+ ! this . props . tileShape
984
+ || this . props . tileShape === TileShape . Reply
985
+ || this . props . tileShape === TileShape . ReplyPreview
986
+ ) {
983
987
sender = < SenderProfile onClick = { this . onSenderProfileClick }
984
988
mxEvent = { this . props . mxEvent }
985
989
enableFlair = { this . props . enableFlair }
@@ -1065,7 +1069,7 @@ export default class EventTile extends React.Component<IProps, IState> {
1065
1069
}
1066
1070
1067
1071
switch ( this . props . tileShape ) {
1068
- case 'notif' : {
1072
+ case TileShape . Notif : {
1069
1073
const room = this . context . getRoom ( this . props . mxEvent . getRoomId ( ) ) ;
1070
1074
return React . createElement ( this . props . as || "li" , {
1071
1075
"className" : classes ,
@@ -1097,7 +1101,7 @@ export default class EventTile extends React.Component<IProps, IState> {
1097
1101
</ div > ,
1098
1102
] ) ;
1099
1103
}
1100
- case 'file_grid' : {
1104
+ case TileShape . FileGrid : {
1101
1105
return React . createElement ( this . props . as || "li" , {
1102
1106
"className" : classes ,
1103
1107
"aria-live" : ariaLive ,
@@ -1128,10 +1132,10 @@ export default class EventTile extends React.Component<IProps, IState> {
1128
1132
] ) ;
1129
1133
}
1130
1134
1131
- case 'reply' :
1132
- case 'reply_preview' : {
1135
+ case TileShape . Reply :
1136
+ case TileShape . ReplyPreview : {
1133
1137
let thread ;
1134
- if ( this . props . tileShape === 'reply_preview' ) {
1138
+ if ( this . props . tileShape === TileShape . ReplyPreview ) {
1135
1139
thread = ReplyThread . makeThread (
1136
1140
this . props . mxEvent ,
1137
1141
this . props . onHeightChanged ,
0 commit comments