diff --git a/src/addons/messages/pages/settings/settings.page.ts b/src/addons/messages/pages/settings/settings.page.ts index 4e540d70d..0fe82855e 100644 --- a/src/addons/messages/pages/settings/settings.page.ts +++ b/src/addons/messages/pages/settings/settings.page.ts @@ -34,7 +34,6 @@ import { IonRefresher } from '@ionic/angular'; @Component({ selector: 'page-addon-messages-settings', templateUrl: 'settings.html', - styleUrls: ['settings.scss'], }) export class AddonMessagesSettingsPage implements OnInit, OnDestroy { diff --git a/src/addons/messages/pages/settings/settings.scss b/src/addons/messages/pages/settings/settings.scss deleted file mode 100644 index b0fc90bb0..000000000 --- a/src/addons/messages/pages/settings/settings.scss +++ /dev/null @@ -1,10 +0,0 @@ -:host { - .list-header { - margin-bottom: 0; - border-top: 0; - } - - .toggle { - display: inline-block; - } -} diff --git a/src/core/features/contentlinks/services/contentlinks-helper.ts b/src/core/features/contentlinks/services/contentlinks-helper.ts index a198a1fa9..f0d19002b 100644 --- a/src/core/features/contentlinks/services/contentlinks-helper.ts +++ b/src/core/features/contentlinks/services/contentlinks-helper.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Injectable } from '@angular/core'; -import { NavController } from '@ionic/angular'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; 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, * otherwise it will 'redirect' to the other site. * + * @param navCtrlUnused Deprecated param. * @param pageName Name of the page to go. * @param pageParams Params to send to the page. * @param siteId Site ID. If not defined, current site. @@ -90,7 +90,7 @@ export class CoreContentLinksHelperProvider { * @return Promise resolved when done. * @deprecated since 3.9.5. Use CoreNavigator.navigateToSitePath instead. */ - async goInSite(navCtrl: NavController, pageName: string, pageParams: Params, siteId?: string): Promise { + async goInSite(navCtrlUnused: unknown, pageName: string, pageParams: Params, siteId?: string): Promise { await CoreNavigator.instance.navigateToSitePath(pageName, { params: pageParams, siteId }); } diff --git a/src/core/features/course/classes/main-resource-component.ts b/src/core/features/course/classes/main-resource-component.ts index 9e802aea1..7d838a22e 100644 --- a/src/core/features/course/classes/main-resource-component.ts +++ b/src/core/features/course/classes/main-resource-component.ts @@ -223,7 +223,8 @@ export class CoreCourseModuleMainResourceComponent implements OnInit, OnDestroy, * Go to blog posts. */ async gotoBlog(): Promise { - // @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 }); } /** diff --git a/src/core/features/grades/services/grades-helper.ts b/src/core/features/grades/services/grades-helper.ts index 0bb36e7ee..5fa221650 100644 --- a/src/core/features/grades/services/grades-helper.ts +++ b/src/core/features/grades/services/grades-helper.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Injectable } from '@angular/core'; -import { NavController } from '@ionic/angular'; import { CoreLogger } from '@singletons/logger'; import { CoreSites, CoreSitesReadingStrategy } from '@services/sites'; @@ -440,7 +439,6 @@ export class CoreGradesHelperProvider { * @param courseId Course ID to view. * @param userId User to view. If not defined, current user. * @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. * @return Promise resolved when done. */ @@ -448,11 +446,10 @@ export class CoreGradesHelperProvider { courseId: number, userId?: number, moduleId?: number, - navCtrl?: NavController, siteId?: string, ): Promise { const modal = await CoreDomUtils.instance.showModalLoading(); - let currentUserId; + let currentUserId: number; try { 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. - if (CoreCourse.instance.currentViewIsCourse(navCtrl, courseId)) { + if (CoreCourse.instance.currentViewIsCourse(courseId)) { // Current view is this course, just select the grades tab. CoreCourse.instance.selectCourseTab('CoreGrades'); diff --git a/src/core/features/grades/services/handlers/user-link.ts b/src/core/features/grades/services/handlers/user-link.ts index e6a3116d5..96ddd29e8 100644 --- a/src/core/features/grades/services/handlers/user-link.ts +++ b/src/core/features/grades/services/handlers/user-link.ts @@ -50,11 +50,11 @@ export class CoreGradesUserLinkHandlerService extends CoreContentLinksHandlerBas data = data || {}; return [{ - action: (siteId, navCtrl?): void => { + action: (siteId): void => { const userId = params.userid && parseInt(params.userid, 10); const moduleId = data?.cmid && parseInt(data.cmid, 10) || undefined; - CoreGradesHelper.instance.goToGrades(courseId!, userId, moduleId, navCtrl, siteId); + CoreGradesHelper.instance.goToGrades(courseId!, userId, moduleId, siteId); }, }]; } diff --git a/src/core/features/login/services/login-helper.ts b/src/core/features/login/services/login-helper.ts index d8dbf4db6..0004cb0ac 100644 --- a/src/core/features/login/services/login-helper.ts +++ b/src/core/features/login/services/login-helper.ts @@ -14,7 +14,6 @@ import { Injectable } from '@angular/core'; import { Params } from '@angular/router'; -import { NavController } from '@ionic/angular'; import { Md5 } from 'ts-md5/dist/md5'; 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. * - * @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 params Params to pass to the page. * @param options Navigation options. @@ -456,7 +455,7 @@ export class CoreLoginHelperProvider { * @deprecated since 3.9.5. Use CoreNavigator.navigateToSiteHome or CoreNavigator.navigateToSitePath instead. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any - async goToSiteInitialPage(navCtrl?: NavController, page?: string, params?: any, options?: any, url?: string): Promise { + async goToSiteInitialPage(navCtrlUnused?: unknown, page?: string, params?: any, options?: any, url?: string): Promise { await CoreNavigator.instance.navigateToSiteHome({ ...options, params: { diff --git a/src/core/singletons/window.ts b/src/core/singletons/window.ts index 593cbcea6..6932347a8 100644 --- a/src/core/singletons/window.ts +++ b/src/core/singletons/window.ts @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { CoreContentLinksHelper } from '@features/contentlinks/services/contentlinks-helper'; import { NavController } from '@ionic/angular'; import { CoreFileHelper } from '@services/file-helper'; @@ -21,6 +22,8 @@ import { CoreUtils } from '@services/utils/utils'; /** * Options for the open function. + * + * @deprecated since 3.9.5 */ export type CoreWindowOpenOptions = { /** @@ -46,10 +49,9 @@ export class CoreWindow { * * @param url URL to open. * @param name Name of the browsing context into which to load the URL. - * @param options Other options. * @return Promise resolved when done. */ - static async open(url: string, name?: string, options?: CoreWindowOpenOptions): Promise { + static async open(url: string, name?: string): Promise { if (CoreUrlUtils.instance.isLocalFileUrl(url)) { const filename = url.substr(url.lastIndexOf('/') + 1); @@ -64,13 +66,11 @@ export class CoreWindow { await CoreUtils.instance.openFile(url); } else { let treated = false; - // eslint-disable-next-line @typescript-eslint/no-unused-vars - options = options || {}; if (name != '_system') { // Check if it can be opened in the app. treated = false; - // @todo await CoreContentLinksHelper.instance.handleLink(url, undefined, options.navCtrl, true, true); + await CoreContentLinksHelper.instance.handleLink(url, undefined, true, true); } if (!treated) {