diff --git a/src/app/components/feed/feed.component.html b/src/app/components/feed/feed.component.html
index 1584af1..de81a86 100644
--- a/src/app/components/feed/feed.component.html
+++ b/src/app/components/feed/feed.component.html
@@ -9,14 +9,14 @@
- I protected the environment.
+ I protected the environment.
What did you do?
nothing ;)
- {{action.name}}
+ {{action.name}} ({{action.description}})
@@ -37,7 +37,7 @@
-
+
New
Most Liked
diff --git a/src/app/components/feed/feed.component.ts b/src/app/components/feed/feed.component.ts
index 9665fc9..d242979 100644
--- a/src/app/components/feed/feed.component.ts
+++ b/src/app/components/feed/feed.component.ts
@@ -14,7 +14,8 @@ import { User } from 'src/app/models/user';
export class FeedComponent implements OnInit {
loading = true;
- checked: boolean; // if the "I protected the environment."-box is checked
+ checked = false; // if the "I protected the environment."-box is checked
+ view = 'new';
empty: any;
// id of the green activity
value: any;
@@ -48,14 +49,16 @@ export class FeedComponent implements OnInit {
}
createPost(pElement, activityId: string) {
- if (pElement && activityId) {
+ if (pElement && activityId && this.checked) {
this.feedService.createPostActivity(pElement.value, activityId);
pElement.value = '';
this.empty = '';
+ this.view = 'new';
} else if (pElement) {
this.feedService.createPost(pElement.value);
pElement.value = '';
this.empty = '';
+ this.view = 'new';
}
}
diff --git a/src/app/components/feed/postlist/postlist.component.html b/src/app/components/feed/postlist/postlist.component.html
index 40945c7..c182e2c 100644
--- a/src/app/components/feed/postlist/postlist.component.html
+++ b/src/app/components/feed/postlist/postlist.component.html
@@ -58,7 +58,7 @@
{{post.downvotes}}
- {{post.activity.points}} points earned through {{post.activity.name}}
+ {{post.activity.points}} points earned through {{post.activity.name}}