Download universal APK instead of first one for preview releases (#701)

* Download universal APK instead of first one

* Support preview APK when it reaches 10k commits

Co-authored-by: Soitora <simon.mattila@protonmail.com>

Co-authored-by: Soitora <simon.mattila@protonmail.com>
This commit is contained in:
Andreas 2021-07-04 15:05:12 +02:00 committed by GitHub
parent 52d93c4df7
commit a08dc98055

View File

@ -42,7 +42,7 @@ export default {
} }
try { try {
const { data } = await this.$store.dispatch("getPreviewReleaseData"); const { data } = await this.$store.dispatch("getPreviewReleaseData");
const apkAsset = data.assets.find((a) => a.name.includes(".apk")); const apkAsset = data.assets.find((a) => /^tachiyomi-r\d{4,}.apk/.test(a.name));
this.$data.previewTagName = data.tag_name; this.$data.previewTagName = data.tag_name;
this.$data.previewbrowserDownloadUrl = apkAsset.browser_download_url; this.$data.previewbrowserDownloadUrl = apkAsset.browser_download_url;
} catch (e) { } catch (e) {