mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-12-05 11:38:00 +00:00
Refactor className and children to component properties instead och view model snapshots in shared components (#32711)
* Refactor className? to component property in EncryptionEventView * Refactor extraClassNames to default react className as component property for DecryptionFailureBodyView * Refactor className to component property for MessageTimestampView * Refactor className and children to component properties for ReactionsRowButton * Refactor className to component property for DisambiguatedProfile * Refactor className to a component property in DateSeparatorView * Fix for lint errors and EncryptionEventView unsupported icon color * EncryptionEventView fix for icon color css specificity/order
This commit is contained in:
@@ -78,13 +78,11 @@ export class EncryptionEventViewModel
|
||||
props: EncryptionEventViewModelProps,
|
||||
isEncrypted: boolean,
|
||||
): EncryptionEventViewSnapshotInterface {
|
||||
// Keep legacy class names for compatibility with existing timeline layout and styling.
|
||||
const newSnapshot: EncryptionEventViewSnapshotInterface = {
|
||||
state: EncryptionEventState.CHANGED,
|
||||
encryptedStateEvents: undefined,
|
||||
userName: undefined,
|
||||
timestamp: props.timestamp,
|
||||
className: "mx_EventTileBubble mx_cryptoEvent mx_cryptoEvent_icon",
|
||||
};
|
||||
|
||||
const content = props.mxEvent.getContent<RoomEncryptionEventContent>();
|
||||
@@ -113,8 +111,6 @@ export class EncryptionEventViewModel
|
||||
newSnapshot.state = EncryptionEventState.DISABLE_ATTEMPT;
|
||||
} else {
|
||||
newSnapshot.state = EncryptionEventState.UNSUPPORTED;
|
||||
// Unsupported branch matches legacy EncryptionEvent class usage (no icon class).
|
||||
newSnapshot.className = "mx_EventTileBubble mx_cryptoEvent";
|
||||
}
|
||||
|
||||
return newSnapshot;
|
||||
|
||||
Reference in New Issue
Block a user