Prefer native apps over PWA (#27254)
Some checks are pending
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.1) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / Libvips tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.1) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions

This commit is contained in:
Jake Anto 2024-10-08 02:03:14 +05:30 committed by GitHub
parent 4238da6ee3
commit 0c16365991
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,8 @@ class ManifestSerializer < ActiveModel::Serializer
attributes :id, :name, :short_name, attributes :id, :name, :short_name,
:icons, :theme_color, :background_color, :icons, :theme_color, :background_color,
:display, :start_url, :scope, :display, :start_url, :scope,
:share_target, :shortcuts :share_target, :shortcuts,
:prefer_related_applications, :related_applications
def id def id
# This is set to `/home` because that was the old value of `start_url` and # This is set to `/home` because that was the old value of `start_url` and
@ -89,4 +90,28 @@ class ManifestSerializer < ActiveModel::Serializer
}, },
] ]
end end
def prefer_related_applications
true
end
def related_applications
[
{
platform: 'play',
url: 'https://play.google.com/store/apps/details?id=org.joinmastodon.android',
id: 'org.joinmastodon.android',
},
{
platform: 'itunes',
url: 'https://apps.apple.com/us/app/mastodon-for-iphone/id1571998974',
id: 'id1571998974',
},
{
platform: 'f-droid',
url: 'https://f-droid.org/en/packages/org.joinmastodon.android/',
id: 'org.joinmastodon.android',
},
]
end
end end