Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ The format is based on "Keep a Changelog" and follows semantic versioning where

---

## v9.6.12
Date: (see tag)

### Highlights
- Added opt-in crash analytics (Sentry) — disabled by default, can be enabled in Settings.

### Maintenance
- Parser upgrades and dependency/maintenance updates.

---

## v9.6.11
Date: (see tag)

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ android {
applicationId 'io.github.landwarderer.futon'
minSdk = 23
targetSdk = 36
versionCode project.hasProperty('versionCode') ? project.property('versionCode').toInteger() : 90611
versionName project.hasProperty('versionName') ? project.property('versionName') : '9.6.11'
versionCode project.hasProperty('versionCode') ? project.property('versionCode').toInteger() : 90612
versionName project.hasProperty('versionName') ? project.property('versionName') : '9.6.12'
generatedDensities = []
testInstrumentationRunner 'io.github.landwarderer.futon.HiltTestRunner'
ksp {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="io.github.landwarderer.futon"
android:versionCode="90611"
android:versionName="9.6.11"
android:versionCode="90612"
android:versionName="9.6.12"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ class AppUpdateRepository @Inject constructor(
append("/releases/latest")
}

private val changelogUrl = buildString {
append("https://raw.githubusercontent.com/")
append(context.getString(R.string.github_updates_repo))
append("/refs/heads/devel/CHANGELOG.md")
}

val isUpdateAvailable: Boolean
get() = availableUpdate.value != null

Expand Down Expand Up @@ -72,6 +78,18 @@ class AppUpdateRepository @Inject constructor(
}.getOrNull()
}

suspend fun fetchChangelog(): String? = withContext(Dispatchers.IO) {
runCatchingCancellable {
val request = Request.Builder()
.get()
.url(changelogUrl)
.build()
okHttp.newCall(request).await().body?.string()
}.onFailure {
it.printStackTraceDebug()
}.getOrNull()
}

@Suppress("KotlinConstantConditions")
suspend fun isUpdateSupported(): Boolean {
return true // Updates are always available now (just checking for newer version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package io.github.landwarderer.futon.settings.about.changelog
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import org.jsoup.internal.StringUtil
import io.github.landwarderer.futon.core.github.AppUpdateRepository
import io.github.landwarderer.futon.core.ui.BaseViewModel
import javax.inject.Inject
Expand All @@ -17,8 +16,7 @@ class ChangelogViewModel @Inject constructor(

init {
launchLoadingJob(Dispatchers.IO) {
val version = appUpdateRepository.fetchUpdate()
changelog.value = version?.let { "# ${it.name}\n\n${it.description}" }
changelog.value = appUpdateRepository.fetchChangelog()
}
}
}
7 changes: 7 additions & 0 deletions metadata/changelogs/90612.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cAdded opt-in crash analytics and other improvements.

Highlights:
- Added opt-in crash analytics (Sentry) — disabled by default, can be enabled in Settings.

Maintenance:
- Parser upgrades and dependency/maintenance updates.
Loading