fixed tslint errors

master
Max 5 years ago
parent b460f77ee8
commit 7aa028c452

@ -65,7 +65,8 @@ export class MainNavigationComponent implements OnInit {
if (this.user.darkmode === true && this.lighttheme) { if (this.user.darkmode === true && this.lighttheme) {
this.toggleTheme(); this.toggleTheme();
this.darkModeButtonChecked = true; this.darkModeButtonChecked = true;
} else if (this.user.loggedIn && !this.user.darkmode && !this.lighttheme) { // IF user activated darkmode and logged in after that // IF user activated darkmode and logged in after that
} else if (this.user.loggedIn && !this.user.darkmode && !this.lighttheme) {
this.settingsService.setDarkModeActive(true); this.settingsService.setDarkModeActive(true);
} }
this.updateLinks(); this.updateLinks();

@ -63,8 +63,7 @@ export class ProfileComponent implements OnInit {
} else { } else {
this.profileService.getUserData(this.id); this.profileService.getUserData(this.id);
} }
this.profileService.proflile.subscribe(response => this.profileService.proflile.subscribe(response => {
{
if (response) { if (response) {
this.userProfile = response; this.userProfile = response;
// tslint:disable-next-line:max-line-length // tslint:disable-next-line:max-line-length

@ -134,9 +134,9 @@ export class ProfileService {
const userVote: string = post.userVote; const userVote: string = post.userVote;
const deletable: boolean = post.deletable; const deletable: boolean = post.deletable;
const author = new Author(post.author.id, post.author.name, post.author.handle); const author = new Author(post.author.id, post.author.name, post.author.handle);
const temp = new Date(Number(post.createdAt)); const ptemp = new Date(Number(post.createdAt));
const date = temp.toLocaleString('en-GB'); const pdate = ptemp.toLocaleString('en-GB');
posts.push(new Post(id, content, htmlContent, upvotes, downvotes, userVote, deletable, date, author)); posts.push(new Post(id, content, htmlContent, upvotes, downvotes, userVote, deletable, pdate, author));
} }
profile.posts = posts; profile.posts = posts;
console.log(profile); console.log(profile);

Loading…
Cancel
Save