@@ -613,6 +613,7 @@ update msg model =
613
613
, repo = repo
614
614
}
615
615
, build = RemoteData . succeed build
616
+ , favicon = statusToFavicon build. status
616
617
}
617
618
, Interop . setFavicon <| Encode . string <| statusToFavicon build. status
618
619
)
@@ -904,7 +905,11 @@ update msg model =
904
905
Tick interval time ->
905
906
case interval of
906
907
OneSecond ->
907
- ( { model | time = time }, refreshFavicon model. page model. favicon model. build )
908
+ let
909
+ ( favicon, cmd ) =
910
+ refreshFavicon model. page model. favicon model. build
911
+ in
912
+ ( { model | time = time, favicon = favicon }, cmd )
908
913
909
914
FiveSecond data ->
910
915
( model, refreshPage model data )
@@ -1019,7 +1024,7 @@ refreshSubscriptions model =
1019
1024
1020
1025
{- | refreshFavicon : takes page and restores the favicon to the default when not viewing the build page
1021
1026
-}
1022
- refreshFavicon : Page -> Favicon -> WebData Build -> Cmd Msg
1027
+ refreshFavicon : Page -> Favicon -> WebData Build -> ( Favicon , Cmd Msg )
1023
1028
refreshFavicon page currentFavicon build =
1024
1029
case page of
1025
1030
Pages . Build _ _ _ _ ->
@@ -1030,20 +1035,20 @@ refreshFavicon page currentFavicon build =
1030
1035
statusToFavicon b. status
1031
1036
in
1032
1037
if currentFavicon /= newFavicon then
1033
- Interop . setFavicon <| Encode . string newFavicon
1038
+ ( newFavicon , Interop . setFavicon <| Encode . string newFavicon )
1034
1039
1035
1040
else
1036
- Cmd . none
1041
+ ( currentFavicon , Cmd . none )
1037
1042
1038
1043
_ ->
1039
- Cmd . none
1044
+ ( currentFavicon , Cmd . none )
1040
1045
1041
1046
_ ->
1042
1047
if currentFavicon /= defaultFavicon then
1043
- Interop . setFavicon <| Encode . string defaultFavicon
1048
+ ( defaultFavicon , Interop . setFavicon <| Encode . string defaultFavicon )
1044
1049
1045
1050
else
1046
- Cmd . none
1051
+ ( currentFavicon , Cmd . none )
1047
1052
1048
1053
1049
1054
{- | refreshPage : refreshes Vela data based on current page and build status
0 commit comments