Compare commits
2 Commits
v125020581
...
80293a2248
| Author | SHA1 | Date | |
|---|---|---|---|
| 80293a2248 | |||
| 474b12120e |
@@ -26,10 +26,9 @@ jobs:
|
|||||||
- uses: KengoTODA/actions-setup-docker-compose@v1
|
- uses: KengoTODA/actions-setup-docker-compose@v1
|
||||||
with:
|
with:
|
||||||
version: "2.23.3"
|
version: "2.23.3"
|
||||||
# TESTS ARE RUN LOCALLY
|
- name: run selfoss
|
||||||
# - name: run selfoss
|
run: |
|
||||||
# run: |
|
docker compose -f .gitea/workflows/assets/docker-compose.yml up -d
|
||||||
# docker compose -f .gitea/workflows/assets/docker-compose.yml up -d
|
|
||||||
- name: coverage
|
- name: coverage
|
||||||
run: |
|
run: |
|
||||||
./gradlew :koverHtmlReport
|
./gradlew :koverHtmlReport
|
||||||
@@ -40,8 +39,7 @@ jobs:
|
|||||||
retention-days: 1
|
retention-days: 1
|
||||||
overwrite: true
|
overwrite: true
|
||||||
include-hidden-files: true
|
include-hidden-files: true
|
||||||
# TESTS ARE RUN LOCALLY
|
- name: Clean
|
||||||
# - name: Clean
|
if: always()
|
||||||
# if: always()
|
run: |
|
||||||
# run: |
|
docker compose -f .gitea/workflows/assets/docker-compose.yml stop
|
||||||
# docker compose -f .gitea/workflows/assets/docker-compose.yml stop
|
|
||||||
138
.gitea/workflows/on_merge_on_release-test.yml
Normal file
138
.gitea/workflows/on_merge_on_release-test.yml
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
name: Create tag
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- test-releas
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# build:
|
||||||
|
# uses: ./.gitea/workflows/common_build.yml
|
||||||
|
createTagAndChangelog:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Config git
|
||||||
|
run: |
|
||||||
|
git config --global user.email aminecmi+giteadrone@pm.me
|
||||||
|
git config --global user.name giteadrone
|
||||||
|
- name: Creating the tag and generate changelog
|
||||||
|
run: |
|
||||||
|
# git fetch --tags -p
|
||||||
|
# PREV=$(git describe --tags --abbrev=0)
|
||||||
|
# ./build.sh --publish --from-ci
|
||||||
|
# VER=$(git describe --tags --abbrev=0)
|
||||||
|
# CHANGELOG=$(git log $PREV..HEAD --pretty="- %s")
|
||||||
|
# echo "**$VER
|
||||||
|
#
|
||||||
|
# $CHANGELOG
|
||||||
|
echo "AAAAAAAAAAA
|
||||||
|
|
||||||
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
|
$(cat CHANGELOG.md)" > CHANGELOG.md
|
||||||
|
git add CHANGELOG.md
|
||||||
|
# touch ./fastlane/metadata/android/en\-US/changelogs/$VER.txt
|
||||||
|
# echo "**$VER**
|
||||||
|
|
||||||
|
# $CHANGELOG" > ./fastlane/metadata/android/en\-US/changelogs/$VER.txt
|
||||||
|
# git add ./fastlane/metadata/android/en\-US/changelogs/$VER.txt
|
||||||
|
git commit -m "Changelog for $VER"
|
||||||
|
git checkout master
|
||||||
|
git merge release
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: master
|
||||||
|
- name: Merge master in release
|
||||||
|
run: |
|
||||||
|
git merge release
|
||||||
|
- name: Push changes
|
||||||
|
uses: appleboy/git-push-action@v1.0.0
|
||||||
|
with:
|
||||||
|
author_name: giteadrone
|
||||||
|
author_email: aminecmi+giteadrone@pm.me
|
||||||
|
remote: ${{ secrets.REMOTE_URL }}
|
||||||
|
followtags: true
|
||||||
|
ssh_key: ${{ secrets.PRIVATE_KEY }}
|
||||||
|
tags: true
|
||||||
|
branch: master
|
||||||
|
# - name: copy file via ssh password
|
||||||
|
# uses: appleboy/scp-action@v0.1.7
|
||||||
|
# with:
|
||||||
|
# host: amine-bouabdallaoui.fr
|
||||||
|
# username: ubuntu
|
||||||
|
# key: ${{ secrets.PRIVATE_KEY }}
|
||||||
|
# source: "version.txt"
|
||||||
|
# target: "/home/ubuntu/"
|
||||||
|
# - name: deploy version file
|
||||||
|
# uses: appleboy/ssh-action@v1.2.0
|
||||||
|
# with:
|
||||||
|
# host: amine-bouabdallaoui.fr
|
||||||
|
# username: ubuntu
|
||||||
|
# key: ${{ secrets.PRIVATE_KEY }}
|
||||||
|
# script: cd /home/ubuntu && sudo rm -rf /var/www/amine/version.txt && sudo chown www-data:www-data ./version.txt && sudo mv version.txt /var/www/amine/
|
||||||
|
# release:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs: createTagAndChangelog
|
||||||
|
# steps:
|
||||||
|
# - name: Check out repository code
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
# with:
|
||||||
|
# fetch-depth: 0
|
||||||
|
# - name: Fetch tags
|
||||||
|
# id: version
|
||||||
|
# run: |
|
||||||
|
# git fetch --tags -p
|
||||||
|
# PREV=$(git describe --tags --abbrev=0)
|
||||||
|
# echo $PREV
|
||||||
|
# echo "VERSION=$PREV" >> $GITHUB_OUTPUT
|
||||||
|
# - uses: actions/setup-java@v4
|
||||||
|
# with:
|
||||||
|
# distribution: 'temurin'
|
||||||
|
# java-version: '17'
|
||||||
|
# cache: gradle
|
||||||
|
# - name: Setup Android SDK
|
||||||
|
# uses: android-actions/setup-android@v3
|
||||||
|
# - name: Configure gradle...
|
||||||
|
# run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties
|
||||||
|
# - name: setup go
|
||||||
|
# uses: https://github.com/actions/setup-go@v4
|
||||||
|
# with:
|
||||||
|
# go-version: '>=1.20.1'
|
||||||
|
# - name: Generate APK
|
||||||
|
# run: ./gradlew :androidApp:assembleGithubConfigRelease
|
||||||
|
# - name: Get Key
|
||||||
|
# run: wget ${{ secrets.KEY_URL }}
|
||||||
|
# - name: Zippalign
|
||||||
|
# run: |
|
||||||
|
# sdkmanager "build-tools;31.0.0"
|
||||||
|
# ls $ANDROID_HOME/build-tools
|
||||||
|
# $ANDROID_HOME/build-tools/31.0.0/zipalign -f -v 4 androidApp/build/outputs/apk/githubConfig/release/androidApp-githubConfig-release-unsigned.apk androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk
|
||||||
|
# - name: Sigh
|
||||||
|
# run: $ANDROID_HOME/build-tools/31.0.0/apksigner sign -v --out signed.apk --ks ./key --ks-key-alias ${{ secrets.KEY_ALIAS }} --ks-pass pass:${{ secrets.KEYSTORE_PASSWORD }} --v1-signing-enabled true --v2-signing-enabled true androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk
|
||||||
|
# - name: Verify
|
||||||
|
# run: $ANDROID_HOME/build-tools/31.0.0/apksigner verify signed.apk
|
||||||
|
# - name: Release
|
||||||
|
# uses: https://gitea.com/actions/gitea-release-action@main
|
||||||
|
# with:
|
||||||
|
# files: signed.apk
|
||||||
|
# token: ${{ secrets.API_KEY }}
|
||||||
|
# tag_name: ${{ steps.version.outputs.VERSION }}
|
||||||
|
# name: ${{ steps.version.outputs.VERSION }}
|
||||||
|
# - name: Send mail
|
||||||
|
# uses: https://github.com/dawidd6/action-send-mail@v4
|
||||||
|
# with:
|
||||||
|
# connection_url: ${{ secrets.MAIL_CONNECTION }}
|
||||||
|
# to: ${{ secrets.MAIL_TO }}
|
||||||
|
# from: ${{ secrets.MAIL_FROM }}
|
||||||
|
# subject: Mapping file
|
||||||
|
# priority: high
|
||||||
|
# convert_markdown: true
|
||||||
|
# body: Nouveau fichier de mapping pour la version ${{ steps.version.outputs.VERSION }}
|
||||||
|
# attachments: androidApp/build/outputs/mapping/githubConfigRelease/mapping.txt
|
||||||
@@ -16,7 +16,6 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: master
|
|
||||||
- name: Config git
|
- name: Config git
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email aminecmi+giteadrone@pm.me
|
git config --global user.email aminecmi+giteadrone@pm.me
|
||||||
@@ -51,7 +50,7 @@ jobs:
|
|||||||
followtags: true
|
followtags: true
|
||||||
ssh_key: ${{ secrets.PRIVATE_KEY }}
|
ssh_key: ${{ secrets.PRIVATE_KEY }}
|
||||||
tags: true
|
tags: true
|
||||||
branch: master
|
branch: release
|
||||||
- name: copy file via ssh password
|
- name: copy file via ssh password
|
||||||
uses: appleboy/scp-action@v0.1.7
|
uses: appleboy/scp-action@v0.1.7
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -324,5 +324,3 @@ crowdin.properties
|
|||||||
|
|
||||||
.kotlin/
|
.kotlin/
|
||||||
build-cache/
|
build-cache/
|
||||||
|
|
||||||
act
|
|
||||||
|
|||||||
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,23 +1,3 @@
|
|||||||
**v125020471
|
|
||||||
|
|
||||||
- chore: no more docker-compose.
|
|
||||||
- bump: gradle plugin.
|
|
||||||
- Merge pull request 'fix: check index exists.' (#183) from fix-index into master
|
|
||||||
- fix: check index exists.
|
|
||||||
- Changelog for v125020411
|
|
||||||
|
|
||||||
--------------------------------------------------------------------
|
|
||||||
|
|
||||||
**v125020411
|
|
||||||
|
|
||||||
- Merge pull request 'bump' (#182) from bump into master
|
|
||||||
- chore: non transiant R classes.
|
|
||||||
- Merge pull request 'fix: One more missing context.' (#181) from fix-one-more-context into master
|
|
||||||
- bump
|
|
||||||
- fix: One more missing context.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------
|
|
||||||
|
|
||||||
**v125010241
|
**v125010241
|
||||||
|
|
||||||
- Merge pull request 'fix: Link not opening.' (#178) from fix-open-link into master
|
- Merge pull request 'fix: Link not opening.' (#178) from fix-open-link into master
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class HomeActivityTest {
|
|||||||
fun testMenuActions() {
|
fun testMenuActions() {
|
||||||
onView(withId(R.id.action_search)).perform(click())
|
onView(withId(R.id.action_search)).perform(click())
|
||||||
onView(
|
onView(
|
||||||
withId(com.google.android.material.R.id.search_src_text),
|
withId(R.id.search_src_text),
|
||||||
).check(matches(isFocused()))
|
).check(matches(isFocused()))
|
||||||
onView(isRoot()).perform(ViewActions.pressBack())
|
onView(isRoot()).perform(ViewActions.pressBack())
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ class ReaderActivity :
|
|||||||
override fun onPageSelected(position: Int) {
|
override fun onPageSelected(position: Int) {
|
||||||
super.onPageSelected(position)
|
super.onPageSelected(position)
|
||||||
|
|
||||||
if (!allItems.isNullOrEmpty() && allItems.size >= position) {
|
|
||||||
if (allItems[position].starred) {
|
if (allItems[position].starred) {
|
||||||
canRemoveFromFavorite()
|
canRemoveFromFavorite()
|
||||||
} else {
|
} else {
|
||||||
@@ -169,7 +168,6 @@ class ReaderActivity :
|
|||||||
}
|
}
|
||||||
readItem(allItems[position])
|
readItem(allItems[position])
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class ArticleFragment :
|
|||||||
private var colorSurface: Int = 0
|
private var colorSurface: Int = 0
|
||||||
private var fontSize: Int = DEFAULT_FONT_SIZE
|
private var fontSize: Int = DEFAULT_FONT_SIZE
|
||||||
private lateinit var item: SelfossModel.Item
|
private lateinit var item: SelfossModel.Item
|
||||||
private var url: String? = null
|
private lateinit var url: String
|
||||||
private lateinit var contentText: String
|
private lateinit var contentText: String
|
||||||
private lateinit var contentSource: String
|
private lateinit var contentSource: String
|
||||||
private lateinit var contentImage: String
|
private lateinit var contentImage: String
|
||||||
@@ -118,8 +118,8 @@ class ArticleFragment :
|
|||||||
e.sendSilentlyWithAcra()
|
e.sendSilentlyWithAcra()
|
||||||
}
|
}
|
||||||
|
|
||||||
colorOnSurface = getColorFromAttr(com.google.android.material.R.attr.colorOnSurface)
|
colorOnSurface = getColorFromAttr(R.attr.colorOnSurface)
|
||||||
colorSurface = getColorFromAttr(com.google.android.material.R.attr.colorSurface)
|
colorSurface = getColorFromAttr(R.attr.colorSurface)
|
||||||
|
|
||||||
contentText = item.content
|
contentText = item.content
|
||||||
contentTitle = item.title.getHtmlDecoded()
|
contentTitle = item.title.getHtmlDecoded()
|
||||||
@@ -168,8 +168,8 @@ class ArticleFragment :
|
|||||||
|
|
||||||
private fun handleContent() {
|
private fun handleContent() {
|
||||||
if (contentText.isEmptyOrNullOrNullString()) {
|
if (contentText.isEmptyOrNullOrNullString()) {
|
||||||
if (repository.isNetworkAvailable() && url.isUrlValid()) {
|
if (repository.isNetworkAvailable()) {
|
||||||
getContentFromMercury(url!!)
|
getContentFromMercury()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
binding.titleView.text = contentTitle
|
binding.titleView.text = contentTitle
|
||||||
@@ -271,7 +271,7 @@ class ArticleFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("detekt:SwallowedException")
|
@Suppress("detekt:SwallowedException")
|
||||||
private fun getContentFromMercury(url: String) {
|
private fun getContentFromMercury() {
|
||||||
binding.progressBar.visibility = View.VISIBLE
|
binding.progressBar.visibility = View.VISIBLE
|
||||||
|
|
||||||
CoroutineScope(Dispatchers.Main).launch {
|
CoroutineScope(Dispatchers.Main).launch {
|
||||||
@@ -424,10 +424,10 @@ class ArticleFragment :
|
|||||||
|
|
||||||
var baseUrl: String? = null
|
var baseUrl: String? = null
|
||||||
try {
|
try {
|
||||||
val itemUrl = URL(url.orEmpty())
|
val itemUrl = URL(url)
|
||||||
baseUrl = itemUrl.protocol + "://" + itemUrl.host
|
baseUrl = itemUrl.protocol + "://" + itemUrl.host
|
||||||
} catch (e: MalformedURLException) {
|
} catch (e: MalformedURLException) {
|
||||||
e.sendSilentlyWithAcraWithName("htmlToWebview > ${url.orEmpty()}")
|
e.sendSilentlyWithAcraWithName("htmlToWebview > $url")
|
||||||
}
|
}
|
||||||
|
|
||||||
val fontName: String =
|
val fontName: String =
|
||||||
|
|||||||
@@ -83,15 +83,7 @@ class FilterSheetFragment :
|
|||||||
val sourceGroup = binding.sourcesGroup
|
val sourceGroup = binding.sourcesGroup
|
||||||
|
|
||||||
repository.getSourcesDetailsOrStats().forEachIndexed { _, source ->
|
repository.getSourcesDetailsOrStats().forEachIndexed { _, source ->
|
||||||
val c: Chip? =
|
val c = Chip(context)
|
||||||
maybeIfContext {
|
|
||||||
Chip(it)
|
|
||||||
} as Chip?
|
|
||||||
|
|
||||||
if (c == null) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
c.ellipsize = TextUtils.TruncateAt.END
|
c.ellipsize = TextUtils.TruncateAt.END
|
||||||
|
|
||||||
maybeIfContext {
|
maybeIfContext {
|
||||||
@@ -153,11 +145,7 @@ class FilterSheetFragment :
|
|||||||
val tags = repository.getTags()
|
val tags = repository.getTags()
|
||||||
|
|
||||||
tags.forEachIndexed { _, tag ->
|
tags.forEachIndexed { _, tag ->
|
||||||
val c: Chip? = maybeIfContext { Chip(it) } as Chip?
|
val c = Chip(context)
|
||||||
if (c == null) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
c.ellipsize = TextUtils.TruncateAt.END
|
c.ellipsize = TextUtils.TruncateAt.END
|
||||||
c.text = tag.tag
|
c.text = tag.tag
|
||||||
|
|
||||||
|
|||||||
@@ -11,14 +11,13 @@ import bou.amine.apps.readerforselfossv2.android.utils.acra.sendSilentlyWithAcra
|
|||||||
import bou.amine.apps.readerforselfossv2.utils.toStringUriWithHttp
|
import bou.amine.apps.readerforselfossv2.utils.toStringUriWithHttp
|
||||||
|
|
||||||
fun Context.shareLink(
|
fun Context.shareLink(
|
||||||
itemUrl: String?,
|
itemUrl: String,
|
||||||
itemTitle: String,
|
itemTitle: String,
|
||||||
) {
|
) {
|
||||||
if (itemUrl.isUrlValid()) {
|
|
||||||
val sendIntent = Intent()
|
val sendIntent = Intent()
|
||||||
sendIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
sendIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
sendIntent.action = Intent.ACTION_SEND
|
sendIntent.action = Intent.ACTION_SEND
|
||||||
sendIntent.putExtra(Intent.EXTRA_TEXT, itemUrl!!.toStringUriWithHttp())
|
sendIntent.putExtra(Intent.EXTRA_TEXT, itemUrl.toStringUriWithHttp())
|
||||||
sendIntent.putExtra(Intent.EXTRA_SUBJECT, itemTitle)
|
sendIntent.putExtra(Intent.EXTRA_SUBJECT, itemTitle)
|
||||||
sendIntent.type = "text/plain"
|
sendIntent.type = "text/plain"
|
||||||
startActivity(
|
startActivity(
|
||||||
@@ -29,7 +28,6 @@ fun Context.shareLink(
|
|||||||
).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
|
).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@ColorInt
|
@ColorInt
|
||||||
fun Fragment.getColorFromAttr(
|
fun Fragment.getColorFromAttr(
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ import android.widget.Toast
|
|||||||
import bou.amine.apps.readerforselfossv2.android.R
|
import bou.amine.apps.readerforselfossv2.android.R
|
||||||
import bou.amine.apps.readerforselfossv2.android.ReaderActivity
|
import bou.amine.apps.readerforselfossv2.android.ReaderActivity
|
||||||
import bou.amine.apps.readerforselfossv2.model.SelfossModel
|
import bou.amine.apps.readerforselfossv2.model.SelfossModel
|
||||||
import bou.amine.apps.readerforselfossv2.utils.isEmptyOrNullOrNullString
|
import bou.amine.apps.readerforselfossv2.utils.toStringUriWithHttp
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||||
|
|
||||||
fun Context.openItemUrl(
|
fun Context.openItemUrl(
|
||||||
currentItem: Int,
|
currentItem: Int,
|
||||||
linkDecoded: String?,
|
linkDecoded: String,
|
||||||
articleViewer: Boolean,
|
articleViewer: Boolean,
|
||||||
app: Activity,
|
app: Activity,
|
||||||
) {
|
) {
|
||||||
@@ -37,13 +37,12 @@ fun Context.openItemUrl(
|
|||||||
intent.putExtra("currentItem", currentItem)
|
intent.putExtra("currentItem", currentItem)
|
||||||
app.startActivity(intent)
|
app.startActivity(intent)
|
||||||
} else {
|
} else {
|
||||||
this.openUrlInBrowserAsNewTask(linkDecoded!!)
|
this.openUrlInBrowserAsNewTask(linkDecoded)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun String?.isUrlValid(): Boolean =
|
fun String.isUrlValid(): Boolean = this.toHttpUrlOrNull() != null && Patterns.WEB_URL.matcher(this).matches()
|
||||||
!this.isEmptyOrNullOrNullString() && this!!.toHttpUrlOrNull() != null && Patterns.WEB_URL.matcher(this).matches()
|
|
||||||
|
|
||||||
fun String.isBaseUrlInvalid(): Boolean {
|
fun String.isBaseUrlInvalid(): Boolean {
|
||||||
val baseUrl = this.toHttpUrlOrNull()
|
val baseUrl = this.toHttpUrlOrNull()
|
||||||
@@ -57,17 +56,15 @@ fun String.isBaseUrlInvalid(): Boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun Context.openItemUrlInBrowserAsNewTask(i: SelfossModel.Item) {
|
fun Context.openItemUrlInBrowserAsNewTask(i: SelfossModel.Item) {
|
||||||
this.openUrlInBrowserAsNewTask(i.getLinkDecoded())
|
this.openUrlInBrowserAsNewTask(i.getLinkDecoded().toStringUriWithHttp())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.openUrlInBrowserAsNewTask(url: String?) {
|
fun Context.openUrlInBrowserAsNewTask(url: String) {
|
||||||
if (url.isUrlValid()) {
|
|
||||||
val intent = Intent(Intent.ACTION_VIEW)
|
val intent = Intent(Intent.ACTION_VIEW)
|
||||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
intent.data = Uri.parse(url)
|
intent.data = Uri.parse(url)
|
||||||
this.mayBeStartActivity(intent)
|
this.mayBeStartActivity(intent)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun Context.openUrlInBrowser(url: String) {
|
fun Context.openUrlInBrowser(url: String) {
|
||||||
val intent = Intent(Intent.ACTION_VIEW)
|
val intent = Intent(Intent.ACTION_VIEW)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
// trick: for the same plugin versions in all sub-modules
|
// trick: for the same plugin versions in all sub-modules
|
||||||
id("com.android.application").version("8.8.1").apply(false)
|
id("com.android.application").version("8.8.0").apply(false)
|
||||||
id("com.android.library").version("8.8.1").apply(false)
|
id("com.android.library").version("8.8.0").apply(false)
|
||||||
id("org.jetbrains.kotlin.android").version("2.1.0").apply(false)
|
id("org.jetbrains.kotlin.android").version("2.1.0").apply(false)
|
||||||
kotlin("multiplatform").version("2.1.0").apply(false)
|
kotlin("multiplatform").version("2.1.0").apply(false)
|
||||||
id("com.mikepenz.aboutlibraries.plugin").version("10.5.1").apply(false)
|
id("com.mikepenz.aboutlibraries.plugin").version("10.5.1").apply(false)
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
**v125020411**
|
|
||||||
|
|
||||||
- Merge pull request 'bump' (#182) from bump into master
|
|
||||||
- chore: non transiant R classes.
|
|
||||||
- Merge pull request 'fix: One more missing context.' (#181) from fix-one-more-context into master
|
|
||||||
- bump
|
|
||||||
- fix: One more missing context.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
**v125020471**
|
|
||||||
|
|
||||||
- chore: no more docker-compose.
|
|
||||||
- bump: gradle plugin.
|
|
||||||
- Merge pull request 'fix: check index exists.' (#183) from fix-index into master
|
|
||||||
- fix: check index exists.
|
|
||||||
- Changelog for v125020411
|
|
||||||
@@ -19,7 +19,7 @@ kotlin.code.style=official
|
|||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
#android.nonTransitiveRClass=true
|
#android.nonTransitiveRClass=true
|
||||||
android.enableJetifier=false
|
android.enableJetifier=false
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=false
|
||||||
#MPP
|
#MPP
|
||||||
kotlin.mpp.enableCInteropCommonization=true
|
kotlin.mpp.enableCInteropCommonization=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|||||||
@@ -127,8 +127,8 @@ class SelfossModel {
|
|||||||
val tags: List<String>,
|
val tags: List<String>,
|
||||||
val author: String? = null,
|
val author: String? = null,
|
||||||
) {
|
) {
|
||||||
fun getLinkDecoded(): String? {
|
fun getLinkDecoded(): String {
|
||||||
var stringUrl: String?
|
var stringUrl: String
|
||||||
stringUrl =
|
stringUrl =
|
||||||
if (link.contains("//news.google.com/news/") && link.contains("&url=")) {
|
if (link.contains("//news.google.com/news/") && link.contains("&url=")) {
|
||||||
link.substringAfter("&url=")
|
link.substringAfter("&url=")
|
||||||
@@ -146,7 +146,11 @@ class SelfossModel {
|
|||||||
stringUrl = "http:$stringUrl"
|
stringUrl = "http:$stringUrl"
|
||||||
}
|
}
|
||||||
|
|
||||||
return if (stringUrl.isEmptyOrNullOrNullString()) null else stringUrl
|
if (stringUrl.isEmptyOrNullOrNullString()) {
|
||||||
|
throw ModelException("Link $link was translated to $stringUrl, but was empty. Handle this.")
|
||||||
|
}
|
||||||
|
|
||||||
|
return stringUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
fun sourceAuthorAndDate(): String {
|
fun sourceAuthorAndDate(): String {
|
||||||
|
|||||||
Reference in New Issue
Block a user