Merge branch 'develop' into gsouquet/threads-relations

pull/21833/head
Germain Souquet 2021-10-15 08:43:51 +01:00
commit 99ad603d91
2 changed files with 4 additions and 5 deletions

View File

@ -157,6 +157,8 @@ interface ISendMessageComposerProps extends MatrixClientProps {
@replaceableComponent("views.rooms.SendMessageComposer") @replaceableComponent("views.rooms.SendMessageComposer")
export class SendMessageComposer extends React.Component<ISendMessageComposerProps> { export class SendMessageComposer extends React.Component<ISendMessageComposerProps> {
static contextType = RoomContext; static contextType = RoomContext;
public context!: React.ContextType<typeof RoomContext>;
private readonly prepareToEncrypt?: DebouncedFunc<() => void>; private readonly prepareToEncrypt?: DebouncedFunc<() => void>;
private readonly editorRef = createRef<BasicMessageComposer>(); private readonly editorRef = createRef<BasicMessageComposer>();
private model: EditorModel = null; private model: EditorModel = null;
@ -293,7 +295,7 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
} }
private sendQuickReaction(): void { private sendQuickReaction(): void {
const timeline = this.context.liveTimeline(); const timeline = this.context.liveTimeline;
const events = timeline.getEvents(); const events = timeline.getEvents();
const reaction = this.model.parts[1].text; const reaction = this.model.parts[1].text;
for (let i = events.length - 1; i >= 0; i--) { for (let i = events.length - 1; i >= 0; i--) {

View File

@ -15,9 +15,8 @@ limitations under the License.
*/ */
import React from 'react'; import React from 'react';
import { shallow, mount, configure } from "enzyme"; import { shallow, mount } from "enzyme";
import '../../skinned-sdk'; import '../../skinned-sdk';
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
import { import {
ThreadFilterType, ThreadFilterType,
@ -28,8 +27,6 @@ import { ContextMenuButton } from '../../../src/accessibility/context_menu/Conte
import ContextMenu from '../../../src/components/structures/ContextMenu'; import ContextMenu from '../../../src/components/structures/ContextMenu';
import { _t } from '../../../src/languageHandler'; import { _t } from '../../../src/languageHandler';
configure({ adapter: new Adapter() });
describe('ThreadPanel', () => { describe('ThreadPanel', () => {
describe('Header', () => { describe('Header', () => {
it('expect that All filter for ThreadPanelHeader properly renders Show: All threads', () => { it('expect that All filter for ThreadPanelHeader properly renders Show: All threads', () => {