mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 01:24:33 +08:00
FEATURE: Native app banner improvements
This commit adds some improvements to native app banners for iOS and Android - iOS and Android now have separate settings for native app banners - app banners will now only show for users on TL1 and up - app ids are now in a hidden site setting to allow sites to switch to their own app, if desired - iOS only: the site URL is passed to the app arguments
This commit is contained in:
@ -51,13 +51,13 @@ class MetadataController < ApplicationController
|
||||
|
||||
manifest[:short_name] = SiteSetting.short_title if SiteSetting.short_title.present?
|
||||
|
||||
if SiteSetting.native_app_install_banner
|
||||
if current_user && current_user.trust_level >= 1 && SiteSetting.native_app_install_banner_android
|
||||
manifest = manifest.merge(
|
||||
prefer_related_applications: true,
|
||||
related_applications: [
|
||||
{
|
||||
platform: "play",
|
||||
id: "com.discourse"
|
||||
id: SiteSetting.android_app_id
|
||||
}
|
||||
]
|
||||
)
|
||||
|
Reference in New Issue
Block a user