Merge pull request #1277 from dpalou/MOBILE-2325
MOBILE-2325 badges: Remove unused providers and importsmain
commit
253e14cd57
|
@ -13,8 +13,7 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { Component, ViewChild } from '@angular/core';
|
import { Component, ViewChild } from '@angular/core';
|
||||||
import { IonicPage, Content, PopoverController, NavParams } from 'ionic-angular';
|
import { IonicPage, Content, NavParams } from 'ionic-angular';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
|
||||||
import { AddonBadgesProvider } from '../../providers/badges';
|
import { AddonBadgesProvider } from '../../providers/badges';
|
||||||
import { CoreTimeUtilsProvider } from '@providers/utils/time';
|
import { CoreTimeUtilsProvider } from '@providers/utils/time';
|
||||||
import { CoreDomUtilsProvider } from '@providers/utils/dom';
|
import { CoreDomUtilsProvider } from '@providers/utils/dom';
|
||||||
|
@ -43,10 +42,9 @@ export class AddonBadgesIssuedBadgePage {
|
||||||
badgeLoaded = false;
|
badgeLoaded = false;
|
||||||
currentTime = 0;
|
currentTime = 0;
|
||||||
|
|
||||||
constructor(private translate: TranslateService, private badgesProvider: AddonBadgesProvider, navParams: NavParams,
|
constructor(private badgesProvider: AddonBadgesProvider, navParams: NavParams, sitesProvider: CoreSitesProvider,
|
||||||
private domUtils: CoreDomUtilsProvider, private timeUtils: CoreTimeUtilsProvider,
|
private domUtils: CoreDomUtilsProvider, private timeUtils: CoreTimeUtilsProvider,
|
||||||
private sitesProvider: CoreSitesProvider, private userProvider: CoreUserProvider,
|
private userProvider: CoreUserProvider, private coursesProvider: CoreCoursesProvider) {
|
||||||
private coursesProvider: CoreCoursesProvider) {
|
|
||||||
|
|
||||||
this.courseId = navParams.get('courseId') || 0; // Use 0 for site badges.
|
this.courseId = navParams.get('courseId') || 0; // Use 0 for site badges.
|
||||||
this.userId = navParams.get('userId') || sitesProvider.getCurrentSite().getUserId();
|
this.userId = navParams.get('userId') || sitesProvider.getCurrentSite().getUserId();
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { Component, ViewChild } from '@angular/core';
|
import { Component, ViewChild } from '@angular/core';
|
||||||
import { IonicPage, Content, NavParams, NavController } from 'ionic-angular';
|
import { IonicPage, Content, NavParams } from 'ionic-angular';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
|
||||||
import { AddonBadgesProvider } from '../../providers/badges';
|
import { AddonBadgesProvider } from '../../providers/badges';
|
||||||
import { CoreTimeUtilsProvider } from '@providers/utils/time';
|
import { CoreTimeUtilsProvider } from '@providers/utils/time';
|
||||||
import { CoreDomUtilsProvider } from '@providers/utils/dom';
|
import { CoreDomUtilsProvider } from '@providers/utils/dom';
|
||||||
|
@ -41,9 +40,8 @@ export class AddonBadgesUserBadgesPage {
|
||||||
currentTime = 0;
|
currentTime = 0;
|
||||||
badgeHash: string;
|
badgeHash: string;
|
||||||
|
|
||||||
constructor(private translate: TranslateService, private badgesProvider: AddonBadgesProvider,
|
constructor(navParams: NavParams, sitesProvider: CoreSitesProvider, private badgesProvider: AddonBadgesProvider,
|
||||||
navParams: NavParams, private domUtils: CoreDomUtilsProvider, private timeUtils: CoreTimeUtilsProvider,
|
private domUtils: CoreDomUtilsProvider, private timeUtils: CoreTimeUtilsProvider) {
|
||||||
private sitesProvider: CoreSitesProvider) {
|
|
||||||
|
|
||||||
this.courseId = navParams.get('courseId') || 0; // Use 0 for site badges.
|
this.courseId = navParams.get('courseId') || 0; // Use 0 for site badges.
|
||||||
this.userId = navParams.get('userId') || sitesProvider.getCurrentSite().getUserId();
|
this.userId = navParams.get('userId') || sitesProvider.getCurrentSite().getUserId();
|
||||||
|
|
Loading…
Reference in New Issue