fix reloading model when an item is hidden

This commit is contained in:
Aaron Bieber 2023-05-17 21:10:11 -06:00
parent 3794cdf847
commit 643e806747
No known key found for this signature in database
2 changed files with 20 additions and 3 deletions

View File

@ -6236,6 +6236,23 @@ var $elm$core$List$head = function (list) {
var $author$project$Main$HidItem = function (a) { var $author$project$Main$HidItem = function (a) {
return {$: 'HidItem', a: a}; return {$: 'HidItem', a: a};
}; };
var $elm$http$Http$expectBytesResponse = F2(
function (toMsg, toResult) {
return A3(
_Http_expect,
'arraybuffer',
_Http_toDataView,
A2($elm$core$Basics$composeR, toResult, toMsg));
});
var $elm$http$Http$expectWhatever = function (toMsg) {
return A2(
$elm$http$Http$expectBytesResponse,
toMsg,
$elm$http$Http$resolve(
function (_v0) {
return $elm$core$Result$Ok(_Utils_Tuple0);
}));
};
var $elm$json$Json$Encode$int = _Json_wrap; var $elm$json$Json$Encode$int = _Json_wrap;
var $elm$http$Http$jsonBody = function (value) { var $elm$http$Http$jsonBody = function (value) {
return A2( return A2(
@ -6277,7 +6294,7 @@ var $author$project$Main$hideWatched = F2(
return $elm$http$Http$post( return $elm$http$Http$post(
{ {
body: body, body: body,
expect: A2($elm$http$Http$expectJson, $author$project$Main$HidItem, $elm$json$Json$Decode$string), expect: $elm$http$Http$expectWhatever($author$project$Main$HidItem),
url: '/prignores' url: '/prignores'
}); });
}); });

View File

@ -39,7 +39,7 @@ type Msg
| SubmitWatch | SubmitWatch
| SubmitLink | SubmitLink
| HideWatchedItem Int String | HideWatchedItem Int String
| HidItem (Result Http.Error String) | HidItem (Result Http.Error ())
type Status type Status
@ -110,7 +110,7 @@ hideWatched id repo =
Http.post Http.post
{ url = "/prignores" { url = "/prignores"
, body = body , body = body
, expect = Http.expectJson HidItem string , expect = Http.expectWhatever HidItem
} }