Merge branch 'develop' into gsouquet/threads-relations

This commit is contained in:
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")
export class SendMessageComposer extends React.Component<ISendMessageComposerProps> {
static contextType = RoomContext;
public context!: React.ContextType<typeof RoomContext>;
private readonly prepareToEncrypt?: DebouncedFunc<() => void>;
private readonly editorRef = createRef<BasicMessageComposer>();
private model: EditorModel = null;
@ -293,7 +295,7 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
}
private sendQuickReaction(): void {
const timeline = this.context.liveTimeline();
const timeline = this.context.liveTimeline;
const events = timeline.getEvents();
const reaction = this.model.parts[1].text;
for (let i = events.length - 1; i >= 0; i--) {

View file

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