NotificationFilter type.
This commit is contained in:
parent
dbb32037b7
commit
3530f3c79d
@ -60,6 +60,7 @@ init flags location =
|
|||||||
, viewer = Nothing
|
, viewer = Nothing
|
||||||
, currentView = LocalTimelineView
|
, currentView = LocalTimelineView
|
||||||
, currentUser = Nothing
|
, currentUser = Nothing
|
||||||
|
, notificationFilter = NotificationAll
|
||||||
}
|
}
|
||||||
! [ Command.initCommands flags.registration flags.client authCode ]
|
! [ Command.initCommands flags.registration flags.client authCode ]
|
||||||
|
|
||||||
|
@ -111,6 +111,14 @@ type alias Draft =
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
type NotificationFilter
|
||||||
|
= NotificationAll
|
||||||
|
| NotificationOnlyMentions
|
||||||
|
| NotificationOnlyBoosts
|
||||||
|
| NotificationOnlyFavourites
|
||||||
|
| NotificationOnlyFollows
|
||||||
|
|
||||||
|
|
||||||
type ScrollDirection
|
type ScrollDirection
|
||||||
= ScrollTop
|
= ScrollTop
|
||||||
| ScrollBottom
|
| ScrollBottom
|
||||||
@ -148,4 +156,5 @@ type alias Model =
|
|||||||
, viewer : Maybe Viewer
|
, viewer : Maybe Viewer
|
||||||
, currentUser : Maybe Account
|
, currentUser : Maybe Account
|
||||||
, currentView : CurrentView
|
, currentView : CurrentView
|
||||||
|
, notificationFilter : NotificationFilter
|
||||||
}
|
}
|
||||||
|
@ -500,8 +500,8 @@ notificationEntryView currentUser notification =
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
notificationListView : CurrentUser -> List NotificationAggregate -> Html Msg
|
notificationListView : CurrentUser -> NotificationFilter -> List NotificationAggregate -> Html Msg
|
||||||
notificationListView currentUser notifications =
|
notificationListView currentUser filter notifications =
|
||||||
div [ class "col-md-3 column" ]
|
div [ class "col-md-3 column" ]
|
||||||
[ div [ class "panel panel-default notifications-panel" ]
|
[ div [ class "panel panel-default notifications-panel" ]
|
||||||
[ a
|
[ a
|
||||||
@ -764,7 +764,7 @@ homepageView model =
|
|||||||
"home"
|
"home"
|
||||||
currentUser
|
currentUser
|
||||||
model.userTimeline
|
model.userTimeline
|
||||||
, notificationListView currentUser model.notifications
|
, notificationListView currentUser model.notificationFilter model.notifications
|
||||||
, case model.currentView of
|
, case model.currentView of
|
||||||
LocalTimelineView ->
|
LocalTimelineView ->
|
||||||
timelineView
|
timelineView
|
||||||
|
Loading…
Reference in New Issue
Block a user