Merge pull request #3664 from NoelDeMartin/MOBILE-4188
MOBILE-4188 grades: Improve course navigationmain
commit
a0b4c8259d
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSilentError } from '@classes/errors/silenterror';
|
||||
import { CoreItemsManagerSource } from './items-manager-source';
|
||||
|
||||
/**
|
||||
|
@ -45,7 +46,7 @@ export abstract class CoreItemsManager<
|
|||
*/
|
||||
getSource(): Source {
|
||||
if (!this.source) {
|
||||
throw new Error('Source is missing from items manager');
|
||||
throw new CoreSilentError('Source is missing from items manager');
|
||||
}
|
||||
|
||||
return this.source.instance;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<ion-refresher slot="fixed" [disabled]="!columns || !rows" (ionRefresh)="refreshGrades($event.target)">
|
||||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<core-loading [hideUntil]="columns && rows">
|
||||
<core-loading [hideUntil]="loaded">
|
||||
<core-empty-box *ngIf="!rows.length" icon="fas-chart-bar" [message]="'core.grades.nogradesreturned' | translate">
|
||||
</core-empty-box>
|
||||
<div *ngIf="rows.length" class="core-grades-container">
|
||||
|
|
|
@ -58,6 +58,7 @@ export class CoreGradesCoursePage implements AfterViewInit, OnDestroy {
|
|||
rowsOnView = 0;
|
||||
totalColumnsSpan?: number;
|
||||
withinSplitView?: boolean;
|
||||
loaded = false;
|
||||
|
||||
protected useLegacyLayout?: boolean; // Whether to use the layout before 4.1.
|
||||
protected fetchSuccess = false;
|
||||
|
@ -111,6 +112,8 @@ export class CoreGradesCoursePage implements AfterViewInit, OnDestroy {
|
|||
|
||||
await this.swipeManager?.start();
|
||||
await this.fetchInitialGrades();
|
||||
|
||||
this.loaded = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -72,8 +72,14 @@ export class CoreUserParticipantsPage implements OnInit, AfterViewInit, OnDestro
|
|||
*/
|
||||
async ngAfterViewInit(): Promise<void> {
|
||||
await this.fetchInitialParticipants();
|
||||
await this.participants.start(this.splitView);
|
||||
}
|
||||
|
||||
this.participants.start(this.splitView);
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
async ionViewDidEnter(): Promise<void> {
|
||||
await this.participants.start();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,6 +28,7 @@ const routes: Routes = [
|
|||
{
|
||||
path: ':userId',
|
||||
loadChildren: () => import('@features/user/user-profile-lazy.module').then(m => m.CoreUserProfileLazyModule),
|
||||
data: { swipeManagerSource: 'participants' },
|
||||
},
|
||||
], () => CoreScreen.isTablet),
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue