mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 02:33:51 +01:00
Made recents list display something when joining a room which we do not have state data yet
This commit is contained in:
parent
332986ba43
commit
5132fcdb8b
1 changed files with 8 additions and 0 deletions
|
@ -43,6 +43,14 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand
|
||||||
// Refresh the list on matrix invitation and message event
|
// Refresh the list on matrix invitation and message event
|
||||||
$rootScope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) {
|
$rootScope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) {
|
||||||
if (isLive) {
|
if (isLive) {
|
||||||
|
if (!$rootScope.rooms[event.room_id]) {
|
||||||
|
// The user has joined a new room, which we do not have data yet. The reason is that
|
||||||
|
// the room has appeared in the scope of the user rooms after the global initialSync
|
||||||
|
// FIXME: an initialSync on this specific room should be done
|
||||||
|
$rootScope.rooms[event.room_id] = {
|
||||||
|
room_id:event.room_id
|
||||||
|
};
|
||||||
|
}
|
||||||
$rootScope.rooms[event.room_id].lastMsg = event;
|
$rootScope.rooms[event.room_id].lastMsg = event;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue