Loading Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ * Fix mobile more-button wording when there are less than 15 posts [#6118](https://github.com/diaspora/diaspora/pull/6118) * Fix reappearing flash boxes during sign-in [#6146](https://github.com/diaspora/diaspora/pull/6146) * Capitalize Wiki link [#6193](https://github.com/diaspora/diaspora/pull/6193) * Fix mobile photos index page [#6243](https://github.com/diaspora/diaspora/pull/6243) ## Features * Add configuration options for some debug logs [#6090](https://github.com/diaspora/diaspora/pull/6090) Loading app/controllers/photos_controller.rb +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ class PhotosController < ApplicationController } render "people/show", layout: "with_header" end format.mobile { render "people/show" } format.json{ render_for_api :backbone, :json => @posts, :root => :photos } end else Loading app/views/people/show.mobile.haml +13 −13 Original line number Diff line number Diff line Loading @@ -18,17 +18,17 @@ = Diaspora::Taggable.format_tags(@person.tag_string) .span12.profile_stream - if @stream.stream_posts.length > 0 - if @post_type == :photos = render 'photos/index', :photos => @stream.stream_posts = render "photos/index", photos: @posts - else - if @stream.stream_posts.length > 0 #main_stream.stream = render 'shared/stream', :posts => @stream.stream_posts = render 'shared/stream_more_button' = render "shared/stream", posts: @stream.stream_posts = render "shared/stream_more_button" - else #main_stream .dull - if @block.present? = t('.ignoring', :name => @person.first_name) = t(".ignoring", name: @person.first_name) - elsif user_signed_in? && (current_user.person != @person) = t('.has_not_shared_with_you_yet', :name => @person.first_name) = t(".has_not_shared_with_you_yet", name: @person.first_name) app/views/photos/_index.html.haml→app/views/photos/_index.mobile.haml +0 −0 File moved. View file spec/controllers/photos_controller_spec.rb +10 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,16 @@ describe PhotosController, :type => :controller do expect(response).to be_success end it "succeeds on mobile devices without any available pictures" do get :index, format: :mobile, person_id: FactoryGirl.create(:person).guid.to_s expect(response).to be_success end it "succeeds on mobile devices with available pictures" do get :index, format: :mobile, person_id: bob.person.guid.to_s expect(response).to be_success end it "displays the logged in user's pictures" do get :index, :person_id => alice.person.guid.to_s expect(assigns[:person]).to eq(alice.person) Loading Loading
Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ * Fix mobile more-button wording when there are less than 15 posts [#6118](https://github.com/diaspora/diaspora/pull/6118) * Fix reappearing flash boxes during sign-in [#6146](https://github.com/diaspora/diaspora/pull/6146) * Capitalize Wiki link [#6193](https://github.com/diaspora/diaspora/pull/6193) * Fix mobile photos index page [#6243](https://github.com/diaspora/diaspora/pull/6243) ## Features * Add configuration options for some debug logs [#6090](https://github.com/diaspora/diaspora/pull/6090) Loading
app/controllers/photos_controller.rb +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ class PhotosController < ApplicationController } render "people/show", layout: "with_header" end format.mobile { render "people/show" } format.json{ render_for_api :backbone, :json => @posts, :root => :photos } end else Loading
app/views/people/show.mobile.haml +13 −13 Original line number Diff line number Diff line Loading @@ -18,17 +18,17 @@ = Diaspora::Taggable.format_tags(@person.tag_string) .span12.profile_stream - if @stream.stream_posts.length > 0 - if @post_type == :photos = render 'photos/index', :photos => @stream.stream_posts = render "photos/index", photos: @posts - else - if @stream.stream_posts.length > 0 #main_stream.stream = render 'shared/stream', :posts => @stream.stream_posts = render 'shared/stream_more_button' = render "shared/stream", posts: @stream.stream_posts = render "shared/stream_more_button" - else #main_stream .dull - if @block.present? = t('.ignoring', :name => @person.first_name) = t(".ignoring", name: @person.first_name) - elsif user_signed_in? && (current_user.person != @person) = t('.has_not_shared_with_you_yet', :name => @person.first_name) = t(".has_not_shared_with_you_yet", name: @person.first_name)
spec/controllers/photos_controller_spec.rb +10 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,16 @@ describe PhotosController, :type => :controller do expect(response).to be_success end it "succeeds on mobile devices without any available pictures" do get :index, format: :mobile, person_id: FactoryGirl.create(:person).guid.to_s expect(response).to be_success end it "succeeds on mobile devices with available pictures" do get :index, format: :mobile, person_id: bob.person.guid.to_s expect(response).to be_success end it "displays the logged in user's pictures" do get :index, :person_id => alice.person.guid.to_s expect(assigns[:person]).to eq(alice.person) Loading