BF: Do not be polluted by ops events that come when paginating back
This commit is contained in:
parent
b1195c125f
commit
4777c1cd5b
1 changed files with 5 additions and 2 deletions
|
@ -108,8 +108,11 @@ angular.module('eventHandlerService', [])
|
|||
var handlePowerLevels = function(event, isLiveEvent) {
|
||||
initRoom(event.room_id);
|
||||
|
||||
// Keep the latest data. Do not care of events that come when paginating back
|
||||
if (!$rootScope.events.rooms[event.room_id][event.type] || isLiveEvent) {
|
||||
$rootScope.events.rooms[event.room_id][event.type] = event;
|
||||
$rootScope.$broadcast(POWERLEVEL_EVENT, event, isLiveEvent);
|
||||
}
|
||||
};
|
||||
|
||||
var handleCallEvent = function(event, isLiveEvent) {
|
||||
|
|
Loading…
Reference in a new issue