Commit 78b0fbbe authored by Mikica Ivosevic's avatar Mikica Ivosevic Committed by Jonne Haß

Refactor HomeController#toggle_mobile

closes #6260
parent 7c611ca5
......@@ -6,6 +6,7 @@
* Drop outdated/unused mbp-respond.min.js and mbp-modernizr-custom.js [#6257](https://github.com/diaspora/diaspora/pull/6257)
* Refactor ApplicationController#after\_sign\_out\_path\_for [#6258](https://github.com/diaspora/diaspora/pull/6258)
* Extract StatusMessageService from StatusMessagesController [#6280](https://github.com/diaspora/diaspora/pull/6280)
* Refactor HomeController#toggle\_mobile [#6260](https://github.com/diaspora/diaspora/pull/6260)
## Bug fixes
* Fix indentation and a link title on the default home page [#6212](https://github.com/diaspora/diaspora/pull/6212)
......
......@@ -26,13 +26,7 @@ class HomeController < ApplicationController
end
def toggle_mobile
if session[:mobile_view].nil?
# we're most probably not on mobile, but user wants it anyway
session[:mobile_view] = true
else
# switch from mobile to normal html
session[:mobile_view] = !session[:mobile_view]
end
session[:mobile_view] = session[:mobile_view].nil? ? true : !session[:mobile_view]
redirect_to :back
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment