You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Give timelines a name
The debug of "joined timeline [Object] to timeline [Object]" isn't terribly helpful, so let's at least give them an identifier.
This commit is contained in:
@@ -42,6 +42,8 @@ function EventTimeline(roomId) {
|
|||||||
|
|
||||||
// this is used by client.js
|
// this is used by client.js
|
||||||
this._paginationRequests = {'b': null, 'f': null};
|
this._paginationRequests = {'b': null, 'f': null};
|
||||||
|
|
||||||
|
this._name = roomId + ":" + new Date().toISOString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -290,6 +292,15 @@ EventTimeline.prototype.removeEvent = function(eventId) {
|
|||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a string to identify this timeline, for debugging
|
||||||
|
*
|
||||||
|
* @return {string} name for this timeline
|
||||||
|
*/
|
||||||
|
EventTimeline.prototype.toString = function() {
|
||||||
|
return this._name;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The EventTimeline class
|
* The EventTimeline class
|
||||||
|
|||||||
Reference in New Issue
Block a user