This commit is contained in:
mgabdev
2020-05-01 01:50:27 -04:00
parent c15d4f12dc
commit 8e349c368c
99 changed files with 1268 additions and 887 deletions

View File

@@ -69,8 +69,6 @@ const expandNormalizedNotifications = (state, notifications, next) => {
let items = ImmutableList()
console.log("notifications:", notifications)
notifications.forEach((n) => {
const notification = notificationToMap(n)
const statusId = notification.get('status')
@@ -136,8 +134,6 @@ const expandNormalizedNotifications = (state, notifications, next) => {
}
}
console.log("final items: ", items)
return state.withMutations(mutable => {
if (!items.isEmpty()) {
mutable.update('items', list => {
@@ -149,12 +145,8 @@ const expandNormalizedNotifications = (state, notifications, next) => {
item => item !== null && compareId(item.get('id'), items.first().get('id')) > 0
)
// console.log("firstIndex, lastIndex: ", firstIndex, lastIndex)
const pop = list.take(firstIndex).concat(items, list.skip(lastIndex))
// console.log("pop:", pop)
return pop
})
}
@@ -224,7 +216,6 @@ export default function notifications(state = initialState, action) {
case NOTIFICATIONS_FILTER_SET:
return state.withMutations(mutable => {
mutable.set('items', ImmutableList()).set('hasMore', true)
console.log("NOTIFICATIONS_FILTER_SET:", action.path, action.value)
mutable.setIn(['filter', action.path], action.value)
})
case NOTIFICATIONS_SCROLL_TOP: