Skip to content

Commit 7e45e05

Browse files
committed
2.3 - latest functional code
1 parent 1324783 commit 7e45e05

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/app/app.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ export class AppComponent implements OnInit {
341341
playlistItem = this.globals.playlist.find(item => item.id.videoId === listType.id.videoId);
342342
} else {
343343
playlistItem = this.globals.playlist.find(item => item.id === listType.id);
344-
// playlistItem = this.globals.playlist.find(item => item.id.videoId === listType.id);
345344
}
346345

347346
if (typeof playlistItem === 'undefined') {

src/app/services/auth.service.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { map } from 'rxjs/operators';
1212

1313
@Injectable()
1414
export class AuthService {
15-
itemsRef: AngularFireList<any>;
1615

1716
constructor(
1817
private db2: AngularFireDatabase,
@@ -49,16 +48,15 @@ export class AuthService {
4948
const provider = new auth.GoogleAuthProvider();
5049
this.afAuth.auth.signInWithPopup(provider).then(authData => {
5150
console.log(authData.user.uid);
52-
this.itemsRef = this.db2.list('users/' + authData.user.uid);
53-
this.itemsRef.valueChanges().subscribe(data => {
51+
this.db2.list('users/' + authData.user.uid).valueChanges().subscribe(data => {
5452
this.db2.list('users/' + authData.user.uid).valueChanges().subscribe(userData => {
5553
if (userData.length === 0) {
5654
// First time login create user and session
5755
const profile = authData.additionalUserInfo.profile;
5856
const defaultUser = {
5957
name: profile.name,
6058
email: profile.email,
61-
settings: this.shared.settings,
59+
settings: this.globals.settings,
6260
session: localStorage.getItem('session_key'),
6361
};
6462

src/app/services/globals.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class GlobalsService {
1212
lastSearchedVideos: Array<any>;
1313
historyVideos: Array<any> = [];
1414
searchedVideos: Array<ISearchVideo>;
15-
15+
1616
categories: any;
1717
currentCategory: string;
1818
categoriesBlocked = ['19', '22', '25', '27', '29'];

0 commit comments

Comments
 (0)