A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove Return2 usage

+28 -31
+17 -17
src/Applications/Brain.elm
··· 15 15 import Maybe.Extra as Maybe 16 16 import Playlists.Encoding as Playlists 17 17 import Queue 18 - import Return2 exposing (..) 18 + import Return exposing (andThen, return) 19 19 import Return3 20 20 import Settings 21 21 import Sources.Encoding as Sources ··· 148 148 update msg model = 149 149 case msg of 150 150 Bypass -> 151 - return model 151 + Return.singleton model 152 152 153 153 ----------------------------------------- 154 154 -- 🂡 155 155 ----------------------------------------- 156 156 Cmd cmd -> 157 - returnWithModel model cmd 157 + return model cmd 158 158 159 159 ToCache alienEvent -> 160 160 alienEvent 161 161 |> Brain.Ports.toCache 162 - |> returnWithModel model 162 + |> return model 163 163 164 164 ----------------------------------------- 165 165 -- Children ··· 231 231 ] 232 232 ) 233 233 |> Brain.Ports.downloadTracks 234 - |> returnWithModel model 234 + |> return model 235 235 236 236 Process { origin, sources } -> 237 237 { origin = origin ··· 308 308 Alien.AuthSecretKey 309 309 |> Alien.trigger 310 310 |> Brain.Ports.removeCache 311 - |> returnWithModel model 311 + |> return model 312 312 |> andThen saveAllHypaethralData 313 313 314 314 SaveHypaethralDataSlowly debouncerMsg -> ··· 346 346 |> updateWithModel { model | hypaethralStorage = rest } 347 347 348 348 _ -> 349 - return model 349 + Return.singleton model 350 350 351 351 SaveNextHypaethralBit -> 352 352 case model.hypaethralStorage of ··· 358 358 |> updateWithModel { model | hypaethralStorage = rest } 359 359 360 360 _ -> 361 - return model 361 + Return.singleton model 362 362 363 363 364 - updateWithModel : Model -> Msg -> Return Model Msg 364 + updateWithModel : Model -> Msg -> ( Model, Cmd Msg ) 365 365 updateWithModel model msg = 366 366 update msg model 367 367 ··· 370 370 -- 📣 ░░ REPLIES 371 371 372 372 373 - translateReply : Reply -> Model -> Return Model Msg 373 + translateReply : Reply -> Model -> ( Model, Cmd Msg ) 374 374 translateReply reply model = 375 375 case reply of 376 376 FabricatedNewSecretKey -> ··· 403 403 data 404 404 |> Alien.broadcast Alien.LoadHypaethralUserData 405 405 |> Brain.Ports.toUI 406 - |> returnWithModel 406 + |> return 407 407 { model | hypaethralUserData = decodedData } 408 408 |> andThen 409 409 (decodedData.tracks ··· 417 417 data 418 418 |> Alien.broadcast tag 419 419 |> Brain.Ports.toUI 420 - |> returnWithModel model 420 + |> return model 421 421 422 422 NudgeUI Alien.ImportLegacyData -> 423 - model 424 - |> saveAllHypaethralData 425 - |> addCommand (Brain.Ports.toUI <| Alien.trigger Alien.ImportLegacyData) 423 + Return.command 424 + (Brain.Ports.toUI <| Alien.trigger Alien.ImportLegacyData) 425 + (saveAllHypaethralData model) 426 426 427 427 NudgeUI tag -> 428 428 tag 429 429 |> Alien.trigger 430 430 |> Brain.Ports.toUI 431 - |> returnWithModel model 431 + |> return model 432 432 433 433 434 434 ··· 478 478 -- 📣 ░░ FUNCTIONS 479 479 480 480 481 - saveTracks : Model -> List Tracks.Track -> Return Model Msg 481 + saveTracks : Model -> List Tracks.Track -> ( Model, Cmd Msg ) 482 482 saveTracks model tracks = 483 483 tracks 484 484 -- Store in model
+6 -6
src/Applications/UI.elm
··· 17 17 import Notifications 18 18 import Playlists.Encoding as Playlists 19 19 import Queue 20 - import Return2 exposing (..) 20 + import Return 21 21 import Return3 22 22 import Sources 23 23 import Sources.Encoding as Sources ··· 81 81 -- 🌳 82 82 83 83 84 - init : Flags -> Url -> Nav.Key -> Return Model Msg 84 + init : Flags -> Url -> Nav.Key -> ( Model, Cmd Msg ) 85 85 init flags url key = 86 86 let 87 87 rewrittenUrl = ··· 151 151 } 152 152 |> update 153 153 (PageChanged page) 154 - |> addCommand 154 + |> Return.command 155 155 (if Maybe.isNothing maybePage then 156 156 Routing.resetUrl key url page 157 157 158 158 else 159 159 Cmd.none 160 160 ) 161 - |> addCommand 161 + |> Return.command 162 162 (Task.perform SetCurrentTime Time.now) 163 163 164 164 ··· 166 166 -- 📣 167 167 168 168 169 - update : Msg -> Model -> Return Model Msg 169 + update : Msg -> Model -> ( Model, Cmd Msg ) 170 170 update msg = 171 171 case msg of 172 172 Bypass -> 173 - return 173 + Return.singleton 174 174 175 175 Reply reply -> 176 176 Reply.translate reply
-1
src/Applications/UI/Types.elm
··· 32 32 import Playlists exposing (PlaylistTrack) 33 33 import Playlists.Encoding as Playlists 34 34 import Queue 35 - import Return2 exposing (..) 36 35 import Sources 37 36 import Sources.Encoding as Sources 38 37 import String.Ext as String
-1
src/Applications/UI/View.elm
··· 18 18 import Maybe.Extra as Maybe 19 19 import Playlists.Encoding as Playlists 20 20 import Queue 21 - import Return2 exposing (..) 22 21 import Settings 23 22 import Sources 24 23 import Sources.Encoding as Sources
+5 -6
src/Library/Return3.elm
··· 1 1 module Return3 exposing (Return, addCommand, addReplies, addReply, andThen, cast, castNested, commandWithModel, from2, fromDebouncer, mapCmd, mapModel, mapReplies, repliesWithModel, replyWithModel, return, returnCommandWithModel, returnRepliesWithModel, returnReplyWithModel, three, wield, wieldNested) 2 2 3 3 import Maybe.Extra as Maybe 4 - import Return2 5 4 6 5 7 6 ··· 28 27 ) 29 28 30 29 31 - from2 : Return2.Return model msg -> Return model msg reply 30 + from2 : ( model, Cmd msg ) -> Return model msg reply 32 31 from2 ( model, cmd ) = 33 32 ( model, cmd, [] ) 34 33 ··· 121 120 122 121 123 122 wield : 124 - (reply -> model -> Return2.Return model msg) 123 + (reply -> model -> ( model, Cmd msg )) 125 124 -> Return model msg reply 126 - -> Return2.Return model msg 125 + -> ( model, Cmd msg ) 127 126 wield replyTransformer ( model, cmd, replies ) = 128 127 List.foldl 129 128 (\reply ( accModel, accCmd ) -> ··· 138 137 139 138 140 139 wieldNested : 141 - (reply -> model -> Return2.Return model msg) 140 + (reply -> model -> ( model, Cmd msg )) 142 141 -> 143 142 { mapCmd : subMsg -> msg 144 143 , mapModel : subModel -> model ··· 148 147 { model : subModel 149 148 , msg : subMsg 150 149 } 151 - -> Return2.Return model msg 150 + -> ( model, Cmd msg ) 152 151 wieldNested replyTransformer a b = 153 152 let 154 153 cmdTransformer =