mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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:
@@ -0,0 +1,20 @@
|
||||
class MigrateNativeAppBannerSiteSetting < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
execute "INSERT INTO site_settings(name, data_type, value, created_at, updated_at)
|
||||
SELECT 'native_app_install_banner_android', 5, value, now(), now()
|
||||
FROM site_settings
|
||||
WHERE name = 'native_app_install_banner'"
|
||||
|
||||
execute "UPDATE site_settings
|
||||
SET name = 'native_app_install_banner_ios'
|
||||
WHERE name = 'native_app_install_banner'"
|
||||
end
|
||||
|
||||
def down
|
||||
execute "UPDATE site_settings
|
||||
SET name = 'native_app_install_banner'
|
||||
WHERE name = 'native_app_install_banner_ios'"
|
||||
|
||||
execute "DELETE FROM site_settings WHERE name = 'native_app_install_banner_android'"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user