NotificationFilter type.

This commit is contained in:
Nicolas Perriault 2017-04-30 11:46:51 +02:00
parent dbb32037b7
commit 3530f3c79d
No known key found for this signature in database
GPG Key ID: DA5E4C83904F7A2A
3 changed files with 13 additions and 3 deletions

View File

@ -60,6 +60,7 @@ init flags location =
, viewer = Nothing
, currentView = LocalTimelineView
, currentUser = Nothing
, notificationFilter = NotificationAll
}
! [ Command.initCommands flags.registration flags.client authCode ]

View File

@ -111,6 +111,14 @@ type alias Draft =
}
type NotificationFilter
= NotificationAll
| NotificationOnlyMentions
| NotificationOnlyBoosts
| NotificationOnlyFavourites
| NotificationOnlyFollows
type ScrollDirection
= ScrollTop
| ScrollBottom
@ -148,4 +156,5 @@ type alias Model =
, viewer : Maybe Viewer
, currentUser : Maybe Account
, currentView : CurrentView
, notificationFilter : NotificationFilter
}

View File

@ -500,8 +500,8 @@ notificationEntryView currentUser notification =
]
notificationListView : CurrentUser -> List NotificationAggregate -> Html Msg
notificationListView currentUser notifications =
notificationListView : CurrentUser -> NotificationFilter -> List NotificationAggregate -> Html Msg
notificationListView currentUser filter notifications =
div [ class "col-md-3 column" ]
[ div [ class "panel panel-default notifications-panel" ]
[ a
@ -764,7 +764,7 @@ homepageView model =
"home"
currentUser
model.userTimeline
, notificationListView currentUser model.notifications
, notificationListView currentUser model.notificationFilter model.notifications
, case model.currentView of
LocalTimelineView ->
timelineView