NotificationFilter type.
This commit is contained in:
parent
dbb32037b7
commit
3530f3c79d
@ -60,6 +60,7 @@ init flags location =
|
||||
, viewer = Nothing
|
||||
, currentView = LocalTimelineView
|
||||
, currentUser = Nothing
|
||||
, notificationFilter = NotificationAll
|
||||
}
|
||||
! [ Command.initCommands flags.registration flags.client authCode ]
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user