Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #826 from ankur01oct/release-2.0.0
Browse files Browse the repository at this point in the history
 Issue SB-12835 fix: search api called twice fix
  • Loading branch information
swayangjit authored Jun 7, 2019
2 parents 8a474ab + 4e60767 commit fdae3c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export const sunbirdSdkFactory =
telemetryApiPath: '/api/data/v1',
deviceRegisterHost: buildConfigValues['DEVICE_REGISTER_BASE_URL'],
telemetrySyncBandwidth: 200,
telemetrySyncThreshold: 300,
telemetrySyncThreshold: 10,
telemetryLogMinAllowedOffset: 86400000
},
sharedPreferencesConfig: {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/courses/courses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ export class CoursesPage implements OnInit, AfterViewInit {
}
});

this.events.subscribe('tab.change', (data) => {
this.events.subscribe('tab.change', (data: string) => {
this.ngZone.run(() => {
if (data === 'COURSES') {
if (data.trim().toUpperCase() === 'COURSES') {
if (this.appliedFilter) {
this.filterIcon = './assets/imgs/ic_action_filter.png';
this.courseFilter = undefined;
Expand Down
12 changes: 6 additions & 6 deletions src/pages/resources/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ export class ResourcesPage implements OnInit, AfterViewInit {
}
});

this.events.subscribe('tab.change', (data) => {
this.events.subscribe('tab.change', (data: string) => {
// this.ngZone.run(() => {
if (data === 'LIBRARY') {
if (data.trim().toUpperCase() === 'LIBRARY') {
if (this.appliedFilter) {
this.filterIcon = './assets/imgs/ic_action_filter.png';
this.resourceFilter = undefined;
Expand Down Expand Up @@ -603,7 +603,7 @@ export class ResourcesPage implements OnInit, AfterViewInit {
if (this.tabs.getSelected().tabTitle === 'LIBRARY‌' && !avoidRefreshList) {
this.commonUtilService.showToast(
this.commonUtilService.translateMessage('EMPTY_LIBRARY_TEXTBOOK_FILTER',
`${this.getGroupByPageReq.grade} (${this.getGroupByPageReq.medium} ${this.commonUtilService.translateMessage('MEDIUM')})`));
`${this.getGroupByPageReq.grade} (${this.getGroupByPageReq.medium} ${this.commonUtilService.translateMessage('MEDIUM')})`));
}
}
});
Expand Down Expand Up @@ -991,8 +991,8 @@ export class ResourcesPage implements OnInit, AfterViewInit {
}
this.getGroupByPageReq.grade = [this.categoryGradeLevels[index].name];
// [grade.name];
if ((this.currentGrade) && (this.currentGrade.name !== this.categoryGradeLevels[index].name)) {
this.getGroupByPage(false,!isClassClicked);
if ((this.currentGrade) && (this.currentGrade.name !== this.categoryGradeLevels[index].name) && isClassClicked) {
this.getGroupByPage(false, !isClassClicked);
}
for (let i = 0, len = this.categoryGradeLevels.length; i < len; i++) {
if (i === index) {
Expand All @@ -1019,7 +1019,7 @@ export class ResourcesPage implements OnInit, AfterViewInit {
this.generateMediumInteractTelemetry(mediumName, this.getGroupByPageReq.medium[0]);
}
this.getGroupByPageReq.medium = [mediumName];
if (this.currentMedium !== mediumName) {
if (this.currentMedium !== mediumName && isMediumClicked) {
this.getGroupByPage(false, !isMediumClicked);
}

Expand Down

0 comments on commit fdae3c8

Please sign in to comment.