Skip to content

Commit a705142

Browse files
committed
Polish and add a test
1 parent d537274 commit a705142

24 files changed

+388
-171
lines changed

__tests__/html/fluentTheme/withCustomDecorator.html

Lines changed: 0 additions & 138 deletions
This file was deleted.

__tests__/html/fluentTheme/withCustomDecorator.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

__tests__/html2/fluentTheme/withCustomDecorator.html renamed to __tests__/html2/fluentTheme/decorator.custom.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
}
2222

2323
.actions {
24-
display: flex;
25-
gap: 4px;
24+
display: contents;
2625
}
2726

2827
.actions > * {
@@ -53,8 +52,11 @@
5352
return <div className="loader">{children}</div>;
5453
}
5554

56-
function Actions({ children }) {
57-
return <div className="actions">{children}</div>;
55+
function Actions({ activity, children }) {
56+
if (activity.entities[0].keywords.includes('highlighted')) {
57+
return <div className="actions">{children}</div>;
58+
}
59+
return <>{children}</>;
5860
}
5961

6062
const decoratorMiddleware = [
@@ -66,7 +68,7 @@
6668
(next => request => (request.livestreamingState === 'preparing' ? Loader : next(request))),
6769
init =>
6870
init === 'activity actions' &&
69-
(next => request => (request.activity.entities?.[0].keywords.includes('highlighted') ? Actions : next(request)))
71+
(next => request => (!request.livestreamingState ? Actions : next(request)))
7072
];
7173

7274
const { directLine, store } = testHelpers.createDirectLineEmulator();

0 commit comments

Comments
 (0)