MOBILE-3660 core: Remove and mark some unused params
parent
1d39a3ed28
commit
66f64c02dc
|
@ -34,7 +34,6 @@ import { IonRefresher } from '@ionic/angular';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-addon-messages-settings',
|
selector: 'page-addon-messages-settings',
|
||||||
templateUrl: 'settings.html',
|
templateUrl: 'settings.html',
|
||||||
styleUrls: ['settings.scss'],
|
|
||||||
})
|
})
|
||||||
export class AddonMessagesSettingsPage implements OnInit, OnDestroy {
|
export class AddonMessagesSettingsPage implements OnInit, OnDestroy {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
:host {
|
|
||||||
.list-header {
|
|
||||||
margin-bottom: 0;
|
|
||||||
border-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -13,7 +13,6 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { NavController } from '@ionic/angular';
|
|
||||||
import { CoreSites } from '@services/sites';
|
import { CoreSites } from '@services/sites';
|
||||||
import { CoreDomUtils } from '@services/utils/dom';
|
import { CoreDomUtils } from '@services/utils/dom';
|
||||||
import { CoreContentLinksDelegate, CoreContentLinksAction } from './contentlinks-delegate';
|
import { CoreContentLinksDelegate, CoreContentLinksAction } from './contentlinks-delegate';
|
||||||
|
@ -83,6 +82,7 @@ export class CoreContentLinksHelperProvider {
|
||||||
* Goes to a certain page in a certain site. If the site is current site it will perform a regular navigation,
|
* Goes to a certain page in a certain site. If the site is current site it will perform a regular navigation,
|
||||||
* otherwise it will 'redirect' to the other site.
|
* otherwise it will 'redirect' to the other site.
|
||||||
*
|
*
|
||||||
|
* @param navCtrlUnused Deprecated param.
|
||||||
* @param pageName Name of the page to go.
|
* @param pageName Name of the page to go.
|
||||||
* @param pageParams Params to send to the page.
|
* @param pageParams Params to send to the page.
|
||||||
* @param siteId Site ID. If not defined, current site.
|
* @param siteId Site ID. If not defined, current site.
|
||||||
|
@ -90,7 +90,7 @@ export class CoreContentLinksHelperProvider {
|
||||||
* @return Promise resolved when done.
|
* @return Promise resolved when done.
|
||||||
* @deprecated since 3.9.5. Use CoreNavigator.navigateToSitePath instead.
|
* @deprecated since 3.9.5. Use CoreNavigator.navigateToSitePath instead.
|
||||||
*/
|
*/
|
||||||
async goInSite(navCtrl: NavController, pageName: string, pageParams: Params, siteId?: string): Promise<void> {
|
async goInSite(navCtrlUnused: unknown, pageName: string, pageParams: Params, siteId?: string): Promise<void> {
|
||||||
await CoreNavigator.instance.navigateToSitePath(pageName, { params: pageParams, siteId });
|
await CoreNavigator.instance.navigateToSitePath(pageName, { params: pageParams, siteId });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,8 @@ export class CoreCourseModuleMainResourceComponent implements OnInit, OnDestroy,
|
||||||
* Go to blog posts.
|
* Go to blog posts.
|
||||||
*/
|
*/
|
||||||
async gotoBlog(): Promise<void> {
|
async gotoBlog(): Promise<void> {
|
||||||
// @todo return this.linkHelper.goInSite(this.navCtrl, 'AddonBlogEntriesPage', { cmId: this.module.id });
|
// const params: Params = { cmId: this.module?.id };
|
||||||
|
// @todo return CoreNavigator.instance.navigateToSitePath('AddonBlogEntriesPage', { params });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { NavController } from '@ionic/angular';
|
|
||||||
|
|
||||||
import { CoreLogger } from '@singletons/logger';
|
import { CoreLogger } from '@singletons/logger';
|
||||||
import { CoreSites, CoreSitesReadingStrategy } from '@services/sites';
|
import { CoreSites, CoreSitesReadingStrategy } from '@services/sites';
|
||||||
|
@ -440,7 +439,6 @@ export class CoreGradesHelperProvider {
|
||||||
* @param courseId Course ID to view.
|
* @param courseId Course ID to view.
|
||||||
* @param userId User to view. If not defined, current user.
|
* @param userId User to view. If not defined, current user.
|
||||||
* @param moduleId Module to view. If not defined, view all course grades.
|
* @param moduleId Module to view. If not defined, view all course grades.
|
||||||
* @param navCtrl NavController to use.
|
|
||||||
* @param siteId Site ID. If not defined, current site.
|
* @param siteId Site ID. If not defined, current site.
|
||||||
* @return Promise resolved when done.
|
* @return Promise resolved when done.
|
||||||
*/
|
*/
|
||||||
|
@ -448,11 +446,10 @@ export class CoreGradesHelperProvider {
|
||||||
courseId: number,
|
courseId: number,
|
||||||
userId?: number,
|
userId?: number,
|
||||||
moduleId?: number,
|
moduleId?: number,
|
||||||
navCtrl?: NavController,
|
|
||||||
siteId?: string,
|
siteId?: string,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const modal = await CoreDomUtils.instance.showModalLoading();
|
const modal = await CoreDomUtils.instance.showModalLoading();
|
||||||
let currentUserId;
|
let currentUserId: number;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const site = await CoreSites.instance.getSite(siteId);
|
const site = await CoreSites.instance.getSite(siteId);
|
||||||
|
@ -504,7 +501,7 @@ export class CoreGradesHelperProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
// View own grades. Check if we already are in the course index page.
|
// View own grades. Check if we already are in the course index page.
|
||||||
if (CoreCourse.instance.currentViewIsCourse(navCtrl, courseId)) {
|
if (CoreCourse.instance.currentViewIsCourse(courseId)) {
|
||||||
// Current view is this course, just select the grades tab.
|
// Current view is this course, just select the grades tab.
|
||||||
CoreCourse.instance.selectCourseTab('CoreGrades');
|
CoreCourse.instance.selectCourseTab('CoreGrades');
|
||||||
|
|
||||||
|
|
|
@ -50,11 +50,11 @@ export class CoreGradesUserLinkHandlerService extends CoreContentLinksHandlerBas
|
||||||
data = data || {};
|
data = data || {};
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
action: (siteId, navCtrl?): void => {
|
action: (siteId): void => {
|
||||||
const userId = params.userid && parseInt(params.userid, 10);
|
const userId = params.userid && parseInt(params.userid, 10);
|
||||||
const moduleId = data?.cmid && parseInt(data.cmid, 10) || undefined;
|
const moduleId = data?.cmid && parseInt(data.cmid, 10) || undefined;
|
||||||
|
|
||||||
CoreGradesHelper.instance.goToGrades(courseId!, userId, moduleId, navCtrl, siteId);
|
CoreGradesHelper.instance.goToGrades(courseId!, userId, moduleId, siteId);
|
||||||
},
|
},
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Params } from '@angular/router';
|
import { Params } from '@angular/router';
|
||||||
import { NavController } from '@ionic/angular';
|
|
||||||
import { Md5 } from 'ts-md5/dist/md5';
|
import { Md5 } from 'ts-md5/dist/md5';
|
||||||
|
|
||||||
import { CoreApp, CoreStoreConfig } from '@services/app';
|
import { CoreApp, CoreStoreConfig } from '@services/app';
|
||||||
|
@ -447,7 +446,7 @@ export class CoreLoginHelperProvider {
|
||||||
/**
|
/**
|
||||||
* Go to the initial page of a site depending on 'userhomepage' setting.
|
* Go to the initial page of a site depending on 'userhomepage' setting.
|
||||||
*
|
*
|
||||||
* @param navCtrl NavController to use. Defaults to app root NavController.
|
* @param navCtrlUnused Deprecated param.
|
||||||
* @param page Name of the page to load after loading the main page.
|
* @param page Name of the page to load after loading the main page.
|
||||||
* @param params Params to pass to the page.
|
* @param params Params to pass to the page.
|
||||||
* @param options Navigation options.
|
* @param options Navigation options.
|
||||||
|
@ -456,7 +455,7 @@ export class CoreLoginHelperProvider {
|
||||||
* @deprecated since 3.9.5. Use CoreNavigator.navigateToSiteHome or CoreNavigator.navigateToSitePath instead.
|
* @deprecated since 3.9.5. Use CoreNavigator.navigateToSiteHome or CoreNavigator.navigateToSitePath instead.
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
async goToSiteInitialPage(navCtrl?: NavController, page?: string, params?: any, options?: any, url?: string): Promise<void> {
|
async goToSiteInitialPage(navCtrlUnused?: unknown, page?: string, params?: any, options?: any, url?: string): Promise<void> {
|
||||||
await CoreNavigator.instance.navigateToSiteHome({
|
await CoreNavigator.instance.navigateToSiteHome({
|
||||||
...options,
|
...options,
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
import { CoreContentLinksHelper } from '@features/contentlinks/services/contentlinks-helper';
|
||||||
import { NavController } from '@ionic/angular';
|
import { NavController } from '@ionic/angular';
|
||||||
|
|
||||||
import { CoreFileHelper } from '@services/file-helper';
|
import { CoreFileHelper } from '@services/file-helper';
|
||||||
|
@ -21,6 +22,8 @@ import { CoreUtils } from '@services/utils/utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options for the open function.
|
* Options for the open function.
|
||||||
|
*
|
||||||
|
* @deprecated since 3.9.5
|
||||||
*/
|
*/
|
||||||
export type CoreWindowOpenOptions = {
|
export type CoreWindowOpenOptions = {
|
||||||
/**
|
/**
|
||||||
|
@ -46,10 +49,9 @@ export class CoreWindow {
|
||||||
*
|
*
|
||||||
* @param url URL to open.
|
* @param url URL to open.
|
||||||
* @param name Name of the browsing context into which to load the URL.
|
* @param name Name of the browsing context into which to load the URL.
|
||||||
* @param options Other options.
|
|
||||||
* @return Promise resolved when done.
|
* @return Promise resolved when done.
|
||||||
*/
|
*/
|
||||||
static async open(url: string, name?: string, options?: CoreWindowOpenOptions): Promise<void> {
|
static async open(url: string, name?: string): Promise<void> {
|
||||||
if (CoreUrlUtils.instance.isLocalFileUrl(url)) {
|
if (CoreUrlUtils.instance.isLocalFileUrl(url)) {
|
||||||
const filename = url.substr(url.lastIndexOf('/') + 1);
|
const filename = url.substr(url.lastIndexOf('/') + 1);
|
||||||
|
|
||||||
|
@ -64,13 +66,11 @@ export class CoreWindow {
|
||||||
await CoreUtils.instance.openFile(url);
|
await CoreUtils.instance.openFile(url);
|
||||||
} else {
|
} else {
|
||||||
let treated = false;
|
let treated = false;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
if (name != '_system') {
|
if (name != '_system') {
|
||||||
// Check if it can be opened in the app.
|
// Check if it can be opened in the app.
|
||||||
treated = false;
|
treated = false;
|
||||||
// @todo await CoreContentLinksHelper.instance.handleLink(url, undefined, options.navCtrl, true, true);
|
await CoreContentLinksHelper.instance.handleLink(url, undefined, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!treated) {
|
if (!treated) {
|
||||||
|
|
Loading…
Reference in New Issue