diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a440e726c4f..ff7cc872274 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -338,6 +338,12 @@ module ApplicationHelper current_user && current_user.trust_level >= 1 && SiteSetting.native_app_install_banner_ios end + def ios_app_argument + # argument only makes sense for DiscourseHub app + SiteSetting.ios_app_id == "1173672076" ? + ", app-argument=discourse://new?siteUrl=#{Discourse.base_url}" : "" + end + def allow_plugins? !request.env[ApplicationController::NO_PLUGINS] end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 3f6c9ff7441..fdebcba6f25 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -44,7 +44,7 @@ <%- if include_ios_native_app_banner? %> - + <%- end %> <%= render partial: "common/discourse_stylesheet" %>