diff --git a/app/javascript/gabsocial/pages/notifications_page.js b/app/javascript/gabsocial/pages/notifications_page.js
index 4a506eee..b06923cd 100644
--- a/app/javascript/gabsocial/pages/notifications_page.js
+++ b/app/javascript/gabsocial/pages/notifications_page.js
@@ -22,8 +22,9 @@ const makeMapStateToProps = state => ({
});
const mapDispatchToProps = (dispatch) => ({
- selectFilter (newActiveFilter) {
- dispatch(setFilter(newActiveFilter));
+ selectFilter(newActiveFilter) {
+ console.log("newActiveFilter:", newActiveFilter)
+ dispatch(setFilter(newActiveFilter))
},
});
@@ -42,43 +43,45 @@ class NotificationsPage extends PureComponent {
document.title = 'Notifications - Gab'
}
- onClick (notificationType) {
- return () => this.props.selectFilter(notificationType);
+ onClick(notificationType) {
+ this.props.selectFilter(notificationType);
}
render() {
- const { children } = this.props
+ const { children, selectedFilter } = this.props
+
+ console.log("selectedFilter:", selectedFilter)
const tabs = [
{
title: 'All',
- onClick: null,
- active: false,
+ onClick: () => this.onClick('all'),
+ active: selectedFilter === 'all',
},
{
title: 'Mentions',
- onClick: null,
- active: false,
+ onClick: () => this.onClick('mention'),
+ active: selectedFilter === 'mention',
},
{
title: 'Likes',
- onClick: null,
- active: false,
+ onClick: () => this.onClick('favourite'),
+ active: selectedFilter === 'favourite',
},
{
title: 'Reposts',
- onClick: null,
- active: false,
+ onClick: () => this.onClick('reblog'),
+ active: selectedFilter === 'reblog',
},
{
title: 'Polls',
- onClick: null,
- active: false,
+ onClick: () => this.onClick('poll'),
+ active: selectedFilter === 'poll',
},
{
title: 'Follows',
- onClick: null,
- active: false,
+ onClick: () => this.onClick('follow'),
+ active: selectedFilter === 'follow',
},
]
diff --git a/app/javascript/gabsocial/pages/profile_page.js b/app/javascript/gabsocial/pages/profile_page.js
index 4a7e1955..34bfb13d 100644
--- a/app/javascript/gabsocial/pages/profile_page.js
+++ b/app/javascript/gabsocial/pages/profile_page.js
@@ -69,7 +69,7 @@ class ProfilePage extends ImmutablePureComponent {
-
+ { !unavailable && }
)}
diff --git a/app/javascript/gabsocial/reducers/notifications.js b/app/javascript/gabsocial/reducers/notifications.js
index 2def0e56..65ea0586 100644
--- a/app/javascript/gabsocial/reducers/notifications.js
+++ b/app/javascript/gabsocial/reducers/notifications.js
@@ -64,13 +64,13 @@ const expandNormalizedNotifications = (state, notifications, next) => {
let items = ImmutableList()
- // : todo filter notiications here:
+ console.log("notifications:", notificationss)
notifications.forEach((n) => {
const notification = notificationToMap(n)
const statusId = notification.get('status')
const type = notification.get('type')
-
+
switch (type) {
case 'follow': {
follows = follows.set(follows.size, notification)
@@ -131,6 +131,8 @@ const expandNormalizedNotifications = (state, notifications, next) => {
}
}
+ console.log("final items: ", items)
+
return state.withMutations(mutable => {
if (!items.isEmpty()) {
mutable.update('items', list => {
diff --git a/app/javascript/gabsocial/reducers/settings.js b/app/javascript/gabsocial/reducers/settings.js
index 343df4e1..f238e998 100644
--- a/app/javascript/gabsocial/reducers/settings.js
+++ b/app/javascript/gabsocial/reducers/settings.js
@@ -47,6 +47,8 @@ const initialState = ImmutableMap({
// : todo : put all notification settings actually IN settings
quickFilter: ImmutableMap({
active: 'all',
+ onlyVerifed: false,
+ onlyFollowing: false,
}),
}),
diff --git a/app/javascript/styles/global.css b/app/javascript/styles/global.css
index 70e59e7f..ae11103a 100644
--- a/app/javascript/styles/global.css
+++ b/app/javascript/styles/global.css
@@ -472,8 +472,8 @@ body {
max-height: 80vh;
}
-.heightMax56PX {
- max-height: 56px;
+.heightMax60PX {
+ max-height: 60px;
}
.heightMin50VH {
@@ -830,6 +830,10 @@ body {
margin-right: 10px;
}
+.mr15 {
+ margin-right: 15px;
+}
+
.ml15 {
margin-left: 15px;
}