File tree Expand file tree Collapse file tree 2 files changed +0
-15
lines changed
Expand file tree Collapse file tree 2 files changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,6 @@ pub fn route_handler(state: SharedState) -> Router<Arc<UiState>> {
226226 . route ( "/settings/followers" , get ( settings:: get_settings_followers) )
227227 . route ( "/settings/events" , get ( settings:: get_settings_events) )
228228 . route ( "/settings/p2p" , get ( settings:: get_settings_p2p) )
229- . route ( "/timeline/prime" , get ( timeline_prime) )
230229 // .route("/a/", put(account_new))
231230 // .route("/t/", put(token_new))
232231 // .route("/m/", put(metric_new).get(metric_find))
@@ -236,15 +235,3 @@ pub fn route_handler(state: SharedState) -> Router<Arc<UiState>> {
236235 . with_state ( state)
237236 . layer ( middleware:: from_fn ( cache_control) )
238237}
239-
240- /// Returns empty timeline-posts div for priming alpine-ajax.
241- ///
242- /// Workaround: The first alpine-ajax request on a page causes the browser to
243- /// scroll to the top. By triggering a dummy ajax request on page load (when
244- /// we're already at the top), the first real infinite scroll request won't
245- /// cause the unwanted scroll jump.
246- async fn timeline_prime ( ) -> Maud {
247- Maud ( maud:: html! {
248- div id="timeline-posts" x-merge="append" { }
249- } )
250- }
Original file line number Diff line number Diff line change @@ -606,8 +606,6 @@ impl UiState {
606606
607607 Ok ( html ! {
608608 div . "o-mainBarTimeline" x-data=( ws_url) {
609- // Workaround: first alpine-ajax request scrolls to top; prime it on load
610- div style="display:none" x-init="$ajax('/timeline/prime', { targets: ['timeline-posts'] })" { }
611609 div . "o-mainBarTimeline__tabs" {
612610 a . "o-mainBarTimeline__back" onclick="history.back()" { "<" }
613611
You can’t perform that action at this time.
0 commit comments