Lint
This commit is contained in:
parent
2ad0032f72
commit
379d19e2e0
2 changed files with 7 additions and 11 deletions
|
@ -544,7 +544,7 @@ export default class MessagePanel extends React.Component {
|
||||||
}
|
}
|
||||||
if (!grouper) {
|
if (!grouper) {
|
||||||
const wantTile = this._shouldShowEvent(mxEv);
|
const wantTile = this._shouldShowEvent(mxEv);
|
||||||
const isGrouped =false;
|
const isGrouped = false;
|
||||||
if (wantTile) {
|
if (wantTile) {
|
||||||
// make sure we unpack the array returned by _getTilesForEvent,
|
// make sure we unpack the array returned by _getTilesForEvent,
|
||||||
// otherwise react will auto-generate keys and we will end up
|
// otherwise react will auto-generate keys and we will end up
|
||||||
|
@ -972,7 +972,7 @@ class CreationGrouper {
|
||||||
const EventListSummary = sdk.getComponent('views.elements.EventListSummary');
|
const EventListSummary = sdk.getComponent('views.elements.EventListSummary');
|
||||||
const panel = this.panel;
|
const panel = this.panel;
|
||||||
const ret = [];
|
const ret = [];
|
||||||
const isGrouped=true;
|
const isGrouped = true;
|
||||||
const createEvent = this.createEvent;
|
const createEvent = this.createEvent;
|
||||||
const lastShownEvent = this.lastShownEvent;
|
const lastShownEvent = this.lastShownEvent;
|
||||||
|
|
||||||
|
@ -1085,7 +1085,7 @@ class RedactionGrouper {
|
||||||
|
|
||||||
const DateSeparator = sdk.getComponent('messages.DateSeparator');
|
const DateSeparator = sdk.getComponent('messages.DateSeparator');
|
||||||
const EventListSummary = sdk.getComponent('views.elements.EventListSummary');
|
const EventListSummary = sdk.getComponent('views.elements.EventListSummary');
|
||||||
const isGrouped=true;
|
const isGrouped = true;
|
||||||
const panel = this.panel;
|
const panel = this.panel;
|
||||||
const ret = [];
|
const ret = [];
|
||||||
const lastShownEvent = this.lastShownEvent;
|
const lastShownEvent = this.lastShownEvent;
|
||||||
|
@ -1102,7 +1102,6 @@ class RedactionGrouper {
|
||||||
);
|
);
|
||||||
|
|
||||||
const senders = new Set();
|
const senders = new Set();
|
||||||
|
|
||||||
let eventTiles = this.events.map((e, i) => {
|
let eventTiles = this.events.map((e, i) => {
|
||||||
senders.add(e.sender);
|
senders.add(e.sender);
|
||||||
const prevEvent = i === 0 ? this.prevEvent : this.events[i - 1];
|
const prevEvent = i === 0 ? this.prevEvent : this.events[i - 1];
|
||||||
|
@ -1186,7 +1185,7 @@ class MemberGrouper {
|
||||||
|
|
||||||
const DateSeparator = sdk.getComponent('messages.DateSeparator');
|
const DateSeparator = sdk.getComponent('messages.DateSeparator');
|
||||||
const MemberEventListSummary = sdk.getComponent('views.elements.MemberEventListSummary');
|
const MemberEventListSummary = sdk.getComponent('views.elements.MemberEventListSummary');
|
||||||
const isGrouped=true;
|
const isGrouped = true;
|
||||||
const panel = this.panel;
|
const panel = this.panel;
|
||||||
const lastShownEvent = this.lastShownEvent;
|
const lastShownEvent = this.lastShownEvent;
|
||||||
const ret = [];
|
const ret = [];
|
||||||
|
|
|
@ -94,7 +94,7 @@ describe('MessagePanel', function() {
|
||||||
return events;
|
return events;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Just to avoid breaking Dateseparator tests that might run at 00hrs
|
// Just to avoid breaking Dateseparator tests that might run at 00hrs
|
||||||
function mkOneDayEvents() {
|
function mkOneDayEvents() {
|
||||||
const events = [];
|
const events = [];
|
||||||
const ts0 = Date.parse('09 May 2004 00:12:00 GMT');
|
const ts0 = Date.parse('09 May 2004 00:12:00 GMT');
|
||||||
|
@ -264,7 +264,6 @@ describe('MessagePanel', function() {
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
function isReadMarkerVisible(rmContainer) {
|
function isReadMarkerVisible(rmContainer) {
|
||||||
return rmContainer && rmContainer.children.length > 0;
|
return rmContainer && rmContainer.children.length > 0;
|
||||||
}
|
}
|
||||||
|
@ -453,7 +452,7 @@ describe('MessagePanel', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render Date separators for the events', function () {
|
it('should render Date separators for the events', function () {
|
||||||
const events = mkOneDayEvents()
|
const events = mkOneDayEvents();
|
||||||
const res = mount(
|
const res = mount(
|
||||||
<WrappedMessagePanel
|
<WrappedMessagePanel
|
||||||
className="cls"
|
className="cls"
|
||||||
|
@ -463,7 +462,5 @@ describe('MessagePanel', function() {
|
||||||
const Dates = res.find(sdk.getComponent('messages.DateSeparator'));
|
const Dates = res.find(sdk.getComponent('messages.DateSeparator'));
|
||||||
|
|
||||||
expect(Dates.length).toEqual(1);
|
expect(Dates.length).toEqual(1);
|
||||||
|
});
|
||||||
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue