Use new js-sdk types properly
parent
058cbbbd0c
commit
3b7c92fd9e
|
@ -23,7 +23,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React, { createRef } from 'react';
|
import React, { createRef } from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { IRecommendedVersion, Room } from "matrix-js-sdk/src/models/room";
|
import { IRecommendedVersion, NotificationCountType, Room } from "matrix-js-sdk/src/models/room";
|
||||||
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||||
import { SearchResult } from "matrix-js-sdk/src/models/search-result";
|
import { SearchResult } from "matrix-js-sdk/src/models/search-result";
|
||||||
import { EventSubscription } from "fbemitter";
|
import { EventSubscription } from "fbemitter";
|
||||||
|
@ -2054,7 +2054,7 @@ export default class RoomView extends React.Component<IProps, IState> {
|
||||||
if (!this.state.atEndOfLiveTimeline && !this.state.searchResults) {
|
if (!this.state.atEndOfLiveTimeline && !this.state.searchResults) {
|
||||||
const JumpToBottomButton = sdk.getComponent('rooms.JumpToBottomButton');
|
const JumpToBottomButton = sdk.getComponent('rooms.JumpToBottomButton');
|
||||||
jumpToBottom = (<JumpToBottomButton
|
jumpToBottom = (<JumpToBottomButton
|
||||||
highlight={this.state.room.getUnreadNotificationCount('highlight') > 0}
|
highlight={this.state.room.getUnreadNotificationCount(NotificationCountType.Highlight) > 0}
|
||||||
numUnreadMessages={this.state.numUnreadMessages}
|
numUnreadMessages={this.state.numUnreadMessages}
|
||||||
onScrollToBottomClick={this.jumpToLiveTimeline}
|
onScrollToBottomClick={this.jumpToLiveTimeline}
|
||||||
roomId={this.state.roomId}
|
roomId={this.state.roomId}
|
||||||
|
|
|
@ -92,7 +92,7 @@ export class BanList {
|
||||||
if (!room) return;
|
if (!room) return;
|
||||||
|
|
||||||
for (const eventType of ALL_RULE_TYPES) {
|
for (const eventType of ALL_RULE_TYPES) {
|
||||||
const events = room.currentState.getStateEvents(eventType, undefined);
|
const events = room.currentState.getStateEvents(eventType);
|
||||||
for (const ev of events) {
|
for (const ev of events) {
|
||||||
if (!ev.getStateKey()) continue;
|
if (!ev.getStateKey()) continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue