Skip to content
Extraits de code Groupes Projets
Valider 9f88850f rédigé par Steffen van Bergerem's avatar Steffen van Bergerem Validation de Benjamin Neff
Parcourir les fichiers

Fix 500 on mobile commented and liked streams

Fixes #7218, regression from #7036

closes #7219
parent ab0a769e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
* Fix visiblity on invitation modal when opening it from the stream [#7191](https://github.com/diaspora/diaspora/pull/7191) * Fix visiblity on invitation modal when opening it from the stream [#7191](https://github.com/diaspora/diaspora/pull/7191)
* Add avatar fallback on tags page [#7198](https://github.com/diaspora/diaspora/pull/7198) * Add avatar fallback on tags page [#7198](https://github.com/diaspora/diaspora/pull/7198)
* Update notifications when changing the stream [#7199](https://github.com/diaspora/diaspora/pull/7199) * Update notifications when changing the stream [#7199](https://github.com/diaspora/diaspora/pull/7199)
* Fix 500 on mobile commented and liked streams [#7219](https://github.com/diaspora/diaspora/pull/7219)
## Features ## Features
* Show spinner when loading comments in the stream [#7170](https://github.com/diaspora/diaspora/pull/7170) * Show spinner when loading comments in the stream [#7170](https://github.com/diaspora/diaspora/pull/7170)
......
...@@ -30,6 +30,10 @@ module StreamHelper ...@@ -30,6 +30,10 @@ module StreamHelper
aspects_stream_path(max_time: time_for_scroll(@stream), a_ids: session[:a_ids]) aspects_stream_path(max_time: time_for_scroll(@stream), a_ids: session[:a_ids])
elsif current_page?(:public_stream) elsif current_page?(:public_stream)
public_stream_path(max_time: time_for_scroll(@stream)) public_stream_path(max_time: time_for_scroll(@stream))
elsif current_page?(:commented_stream)
commented_stream_path(max_time: time_for_scroll(@stream))
elsif current_page?(:liked_stream)
liked_stream_path(max_time: time_for_scroll(@stream))
elsif current_page?(:mentioned_stream) elsif current_page?(:mentioned_stream)
mentioned_stream_path(max_time: time_for_scroll(@stream)) mentioned_stream_path(max_time: time_for_scroll(@stream))
elsif current_page?(:followed_tags_stream) elsif current_page?(:followed_tags_stream)
......
...@@ -41,6 +41,20 @@ describe StreamHelper, type: :helper do ...@@ -41,6 +41,20 @@ describe StreamHelper, type: :helper do
expect(helper.next_page_path).to include activity_stream_path expect(helper.next_page_path).to include activity_stream_path
end end
it "works for commented page when current page is commented stream" do
allow(helper).to receive(:current_page?).and_return(false)
expect(helper).to receive(:current_page?).with(:commented_stream).and_return(true)
allow(helper).to receive(:controller).and_return(build_controller(StreamsController))
expect(helper.next_page_path).to include commented_stream_path
end
it "works for liked page when current page is liked stream" do
allow(helper).to receive(:current_page?).and_return(false)
expect(helper).to receive(:current_page?).with(:liked_stream).and_return(true)
allow(helper).to receive(:controller).and_return(build_controller(StreamsController))
expect(helper.next_page_path).to include liked_stream_path
end
it "works for mentioned page when current page is mentioned stream" do it "works for mentioned page when current page is mentioned stream" do
allow(helper).to receive(:current_page?).and_return(false) allow(helper).to receive(:current_page?).and_return(false)
expect(helper).to receive(:current_page?).with(:mentioned_stream).and_return(true) expect(helper).to receive(:current_page?).with(:mentioned_stream).and_return(true)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter