Skip to content

Commit

Permalink
Merge branch 'release-3.1.0' of https://github.com/Sunbird-Ed/Sunbird…
Browse files Browse the repository at this point in the history
…Ed-mobile-app into release-3.1.0
  • Loading branch information
balakrishna-m committed Jun 29, 2020
2 parents 13c7fb1 + 5eebeb5 commit fbe8204
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
22 changes: 22 additions & 0 deletions src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1337,3 +1337,25 @@ ion-modal.sb-progress-loader {
color: #0ec254;
font-weight: bold;
}

.group-option-popover {
padding: 16px;
ion-item {
font-size: 14px;
font-family: "Noto Sans";
}

ion-item:nth-child(1) {
color: #333333;
}
ion-item:nth-child(2) {
color: #FF4558;
}
}

.group-option-popover .popover-content {
top: 82px !important;
left: 173px !important;
width: 196px;
height: 80px;
}
1 change: 1 addition & 0 deletions src/app/app.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ export class PreferenceKey {
public static readonly COACH_MARK_SEEN = 'coach_mark_seen';
public static readonly PAGE_ASSEMBLE_ORGANISATION_ID = 'page_assemble_organisation_id';
public static readonly CAMPAIGN_PARAMETERS = 'campaign_parameters';
public static readonly CREATE_GROUP_INFO_POPUP = 'create_group_info_popup';
}

export class GenericAppConfig {
Expand Down
2 changes: 1 addition & 1 deletion src/app/my-groups/group-details/group-details.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class GroupDetailsPage {
componentProps: {
list: menuList
},
cssClass: 'download-popover'
cssClass: 'group-option-popover'
});
await groupOptions.present();

Expand Down
17 changes: 13 additions & 4 deletions src/app/my-groups/my-groups.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
import { Router, NavigationExtras } from '@angular/router';

import { AppHeaderService } from '@app/services/app-header.service';
import { RouterLinks } from '../app.constant';
import { AuthService, ClassRoomService, ClassRoom } from '@project-sunbird/sunbird-sdk';
import { RouterLinks, PreferenceKey } from '../app.constant';
import { AuthService, ClassRoomService, ClassRoom, SharedPreferences } from '@project-sunbird/sunbird-sdk';
import { LoginHandlerService } from '@app/services/login-handler.service';
import { CommonUtilService } from '@app/services';
import { PopoverController } from '@ionic/angular';
Expand All @@ -23,12 +23,13 @@ export class MyGroupsPage implements OnInit, OnDestroy {
constructor(
@Inject('AUTH_SERVICE') public authService: AuthService,
@Inject('CLASS_ROOM_SERVICE') public classRoomService: ClassRoomService,
@Inject('SHARED_PREFERENCES') private preferences: SharedPreferences,
private headerService: AppHeaderService,
private router: Router,
private loginHandlerService: LoginHandlerService,
private commonUtilService: CommonUtilService,
private popoverCtrl: PopoverController
) { }
) { }

ngOnInit() {
this.checkUserLoggedIn();
Expand All @@ -47,6 +48,14 @@ export class MyGroupsPage implements OnInit, OnDestroy {
this.fetchGroupList();
}

async ionViewDidEnter() {
const groupInfoScreen = await this.preferences.getBoolean(PreferenceKey.CREATE_GROUP_INFO_POPUP).toPromise();
if (!groupInfoScreen) {
this.openinfopopup();
this.preferences.putBoolean(PreferenceKey.CREATE_GROUP_INFO_POPUP, true).toPromise().then();
}
}

ngOnDestroy() {
if (this.headerObservable) {
this.headerObservable.unsubscribe();
Expand All @@ -66,7 +75,7 @@ export class MyGroupsPage implements OnInit, OnDestroy {
}

login() {
this.loginHandlerService.signIn({skipRootNavigation: true});
this.loginHandlerService.signIn({ skipRootNavigation: true });
}

async fetchGroupList() {
Expand Down

0 comments on commit fbe8204

Please sign in to comment.