Merge pull request #2178 from dpalou/MOBILE-1501
MOBILE-1501 participants: Select first when search or clearmain
commit
dac9ba4de9
|
@ -165,7 +165,12 @@ export class CoreUserParticipantsComponent implements OnInit {
|
|||
|
||||
// Remove search results and display all participants.
|
||||
this.participantsLoaded = false;
|
||||
this.fetchData(true);
|
||||
this.fetchData(true).then(() => {
|
||||
if (this.splitviewCtrl.isOn() && this.participants.length > 0) {
|
||||
// Take first and load it.
|
||||
this.gotoParticipant(this.participants[0].id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -196,6 +201,11 @@ export class CoreUserParticipantsComponent implements OnInit {
|
|||
this.canLoadMore = result.canLoadMore;
|
||||
this.searchPage++;
|
||||
|
||||
if (!loadMore && this.splitviewCtrl.isOn() && this.participants.length > 0) {
|
||||
// Take first and load it.
|
||||
this.gotoParticipant(this.participants[0].id);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
this.domUtils.showErrorModalDefault(error, 'Error searching users.');
|
||||
this.loadMoreError = true;
|
||||
|
|
Loading…
Reference in New Issue