Merge branch 'dev' into codespaces-stoat-adjustment
This commit is contained in:
commit
1d20b4afe0
|
|
@ -80,8 +80,8 @@ android {
|
|||
applicationId = "chat.revolt"
|
||||
minSdk = 26
|
||||
targetSdk = 36
|
||||
versionCode = Integer.parseInt("001_003_207".replace("_", ""), 10)
|
||||
versionName = "1.3.7"
|
||||
versionCode = Integer.parseInt("001_003_208".replace("_", ""), 10)
|
||||
versionName = "1.3.8"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
|
|
|
|||
|
|
@ -63,11 +63,11 @@ val STOAT_FILES =
|
|||
if (USE_ALPHA_API) "https://alpha.revolt.chat/autumn" else "https://cdn.stoatusercontent.com"
|
||||
val STOAT_PROXY =
|
||||
if (USE_ALPHA_API) "https://alpha.revolt.chat/january" else "https://proxy.stoatusercontent.com"
|
||||
const val STOAT_WEB_APP = "https://stoat.chat/app"
|
||||
const val STOAT_WEB_APP = "https://stoat.chat"
|
||||
const val STOAT_INVITES = "https://stt.gg"
|
||||
val STOAT_WEBSOCKET =
|
||||
if (USE_ALPHA_API) "wss://alpha.revolt.chat/ws" else "wss://events.stoat.chat"
|
||||
const val STOAT_KJBOOK = "https://revoltchat.github.io/android"
|
||||
const val STOAT_KJBOOK = "https://stoatchat.github.io/for-android"
|
||||
|
||||
fun String.api(): String {
|
||||
return "$STOAT_BASE$this"
|
||||
|
|
|
|||
|
|
@ -166,12 +166,16 @@ class ChatRouterViewModel @Inject constructor(
|
|||
val current = kvStorage.get("currentDestination")
|
||||
setSaveDestination(ChatRouterDestination.fromString(current ?: ""))
|
||||
|
||||
latestChangelogRead = changelogs.hasSeenCurrent()
|
||||
latestChangelog = changelogs.getLatestChangelogCode()
|
||||
latestChangelogBody =
|
||||
changelogs.fetchChangelogByVersionCode(latestChangelog.toLong()).rendered
|
||||
if (!latestChangelogRead) {
|
||||
changelogs.markAsSeen()
|
||||
try {
|
||||
latestChangelogRead = changelogs.hasSeenCurrent()
|
||||
latestChangelog = changelogs.getLatestChangelogCode()
|
||||
latestChangelogBody =
|
||||
changelogs.fetchChangelogByVersionCode(latestChangelog.toLong()).rendered
|
||||
if (!latestChangelogRead) {
|
||||
changelogs.markAsSeen()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
val seenEarlyAccess = kvStorage.getBoolean("spark/earlyAccess/dismissed")
|
||||
|
|
|
|||
|
|
@ -61,16 +61,24 @@ class ChangelogsSettingsScreenViewModel @Inject constructor(
|
|||
|
||||
suspend fun requestChangelog(version: String) {
|
||||
viewModelScope.launch {
|
||||
renderedChangelog = Changelogs(
|
||||
context,
|
||||
kvStorage
|
||||
).fetchChangelogByVersionCode(version.toLong()).rendered
|
||||
try {
|
||||
renderedChangelog = Changelogs(
|
||||
context,
|
||||
kvStorage
|
||||
).fetchChangelogByVersionCode(version.toLong()).rendered
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun populate() {
|
||||
viewModelScope.launch {
|
||||
index = Changelogs(context, kvStorage).fetchChangelogIndex()
|
||||
try {
|
||||
index = Changelogs(context, kvStorage).fetchChangelogIndex()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<domain-config>
|
||||
<domain includeSubdomains="true">stoatusercontent.com</domain>
|
||||
<trust-anchors>
|
||||
<certificates src="@raw/cloudflare_tls_i_e1" />
|
||||
</trust-anchors>
|
||||
</domain-config>
|
||||
</network-security-config>
|
||||
|
|
@ -4,13 +4,13 @@ import markdownIntegration from "@astropub/md"
|
|||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: "https://revoltchat.github.io",
|
||||
base: "/android",
|
||||
site: "https://stoatchat.github.io",
|
||||
base: "/for-android",
|
||||
integrations: [
|
||||
starlight({
|
||||
title: "Stoat for Android Technical Documentation",
|
||||
social: {
|
||||
github: "https://github.com/revoltchat/android",
|
||||
github: "https://github.com/stoatchat/for-android",
|
||||
},
|
||||
sidebar: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Revolt on Android — Technical Documentation
|
||||
description: A guide to getting started with Revolt on Android.
|
||||
title: Stoat for Android — Technical Documentation
|
||||
description: A guide to getting started with Stoat for Android.
|
||||
template: splash
|
||||
hero:
|
||||
image:
|
||||
|
|
|
|||
Loading…
Reference in New Issue