1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
Ryan Fox 376c7ed70d
Limitless timelines!
GoToSocial's timelines seem to be a bit fucked at the moment, and one of
my accounts won't load anything unless I remove the limits. This is a
workaround for that.
2023-02-07 16:47:50 -08:00
Ryan Fox 5f47525608
Hide inline recipients 2022-12-10 00:13:49 -08:00
2 changed files with 21 additions and 13 deletions

View File

@ -308,6 +308,10 @@ span.applink {
margin-left: 4px;
}
.recipients-inline {
display: none;
}
.status-text {
margin-left: 60px;
color: #efefef;

View File

@ -150,7 +150,6 @@ loadNotifications client url =
HttpBuilder.get (Maybe.withDefault ApiUrl.notifications url)
|> withClient client
|> withBodyDecoder (Decode.list notificationDecoder)
|> withQueryParams [ ( "limit", "30" ) ]
|> send (MastodonEvent << Notifications (url /= Nothing))
Nothing ->
@ -255,7 +254,6 @@ searchAccounts client query limit resolve =
let
qs =
[ ( "q", "@"++query )
, ( "limit", toString limit )
, ( "resolve"
, if resolve then
"true"
@ -324,7 +322,6 @@ loadHomeTimeline client url =
HttpBuilder.get (Maybe.withDefault ApiUrl.homeTimeline url)
|> withClient client
|> withBodyDecoder (Decode.list statusDecoder)
|> withQueryParams [ ( "limit", "60" ) ]
|> send (MastodonEvent << HomeTimeline (url /= Nothing))
Nothing ->
@ -338,7 +335,6 @@ loadLocalTimeline client url =
HttpBuilder.get (Maybe.withDefault ApiUrl.publicTimeline url)
|> withClient client
|> withBodyDecoder (Decode.list statusDecoder)
|> withQueryParams [ ( "local", "true" ), ( "limit", "60" ) ]
|> send (MastodonEvent << LocalTimeline (url /= Nothing))
Nothing ->
@ -352,7 +348,6 @@ loadGlobalTimeline client url =
HttpBuilder.get (Maybe.withDefault ApiUrl.publicTimeline url)
|> withClient client
|> withBodyDecoder (Decode.list statusDecoder)
|> withQueryParams [ ( "limit", "60" ) ]
|> send (MastodonEvent << GlobalTimeline (url /= Nothing))
Nothing ->
@ -366,8 +361,7 @@ loadAccountTimeline client accountId url =
HttpBuilder.get (Maybe.withDefault (ApiUrl.accountTimeline accountId) url)
|> withClient client
|> withBodyDecoder (Decode.list statusDecoder)
|> withQueryParams [ ( "limit", "60" )
, ( "exclude_replies", "true" )
|> withQueryParams [ ( "exclude_replies", "true" )
]
|> send (MastodonEvent << AccountTimeline (url /= Nothing))
@ -382,8 +376,7 @@ loadAccountTimelineReplies client accountId url =
HttpBuilder.get (Maybe.withDefault (ApiUrl.accountTimeline accountId) url)
|> withClient client
|> withBodyDecoder (Decode.list statusDecoder)
|> withQueryParams [ ( "limit", "60" )
, ( "exclude_replies", "false" )
|> withQueryParams [ ( "exclude_replies", "false" )
]
|> send (MastodonEvent << AccountTimeline (url /= Nothing))
@ -398,7 +391,6 @@ loadFavoriteTimeline client url =
HttpBuilder.get (Maybe.withDefault ApiUrl.favouriteTimeline url)
|> withClient client
|> withBodyDecoder (Decode.list statusDecoder)
|> withQueryParams [ ( "limit", "60" ) ]
|> send (MastodonEvent << FavoriteTimeline (url /= Nothing))
Nothing ->
@ -412,7 +404,6 @@ loadHashtagTimeline client hashtag url =
HttpBuilder.get (Maybe.withDefault (ApiUrl.hashtag hashtag) url)
|> withClient client
|> withBodyDecoder (Decode.list statusDecoder)
|> withQueryParams [ ( "limit", "60" ) ]
|> send (MastodonEvent << HashtagTimeline (url /= Nothing))
Nothing ->
@ -426,7 +417,6 @@ loadMutes client url =
HttpBuilder.get (Maybe.withDefault ApiUrl.mutes url)
|> withClient client
|> withBodyDecoder (Decode.list accountDecoder)
|> withQueryParams [ ( "limit", "60" ) ]
|> send (MastodonEvent << Mutes (url /= Nothing))
Nothing ->
@ -440,7 +430,6 @@ loadBlocks client url =
HttpBuilder.get (Maybe.withDefault ApiUrl.blocks url)
|> withClient client
|> withBodyDecoder (Decode.list accountDecoder)
|> withQueryParams [ ( "limit", "60" ) ]
|> send (MastodonEvent << Blocks (url /= Nothing))
Nothing ->
@ -691,6 +680,21 @@ uploadMedia client fileInputId =
Cmd.none
updateMediaDescription : Maybe Client -> String -> String -> Cmd Msg
updateMediaDescription client mediaId description =
case client of
Just { server, token } ->
Ports.updateMedia
{ id = mediaId
, url = server ++ (ApiUrl.updateMedia mediaId)
, token = token
, description = description
}
Nothing ->
Cmd.none
focusId : String -> Cmd Msg
focusId id =
Dom.focus id |> Task.attempt (always NoOp)