fix(favourites): always move current course up

This commit is contained in:
Gregor Kleen 2019-10-04 21:33:06 +02:00
parent 41a8d6239e
commit 56d89d7f58

View File

@ -1721,8 +1721,8 @@ siteLayout' headingOverride widget = do
isAssociated = isParticipant E.||. isLecturer E.||. isCorrector E.||. isTutor
reason = E.case_
[ E.when_ isAssociated E.then_ . E.just $ E.val FavouriteParticipant
, E.when_ isCurrent E.then_ . E.just $ E.val FavouriteCurrent
[ E.when_ isCurrent E.then_ . E.just $ E.val FavouriteCurrent
, E.when_ isAssociated E.then_ . E.just $ E.val FavouriteParticipant
] (E.else_ $ courseFavourite E.?. CourseFavouriteReason)
E.where_ $ ((isFavourite E.||. isAssociated) E.&&. notBlacklist) E.||. isCurrent