-
Notifications
You must be signed in to change notification settings - Fork 0
Release: v1.0.0 Stable with Alpha/Beta Channels #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| package com.bytecats.metanoia.bible | ||
|
|
||
| import okhttp3.Call | ||
| import java.io.IOException | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,8 +6,10 @@ import com.bytecats.metanoia.models.BOOKS | |||||
|
|
||||||
| /** | ||||||
| * A resolved deep-link target: a specific book/chapter, optionally a verse. | ||||||
| * `book` is always the canonical BOOKS entry's exact name (e.g. "SongofSolomon", | ||||||
| * "1Samuel") — never the raw path segment from the incoming URI. | ||||||
| * | ||||||
| * @property book The canonical BOOKS entry's exact name (e.g., "SongofSolomon", "1Samuel") | ||||||
| * @property chapter The chapter number (1-based) | ||||||
| * @property verse Optional verse number (null if only chapter specified) | ||||||
| */ | ||||||
| data class VerseReference(val book: String, val chapter: Int, val verse: Int?) | ||||||
|
|
||||||
|
|
@@ -47,9 +49,23 @@ data class VerseReference(val book: String, val chapter: Int, val verse: Int?) | |||||
| */ | ||||||
| object DeepLink { | ||||||
|
|
||||||
| /** | ||||||
| * Parse a deep-link URI into a VerseReference. | ||||||
| * | ||||||
| * @param uri The Android Uri to parse (either metanoia:// or https:// scheme) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Keep
Proposed documentation fix- * `@param` uri The Android Uri to parse (either metanoia:// or https:// scheme)
+ * `@param` uri The Android Uri to parse (metanoia://, http://, or https:// scheme)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| * @return A VerseReference if the URI is valid, null otherwise | ||||||
| */ | ||||||
| fun parse(uri: Uri): VerseReference? = | ||||||
| parseParts(uri.scheme, uri.host, uri.pathSegments?.toList() ?: emptyList()) | ||||||
|
|
||||||
| /** | ||||||
| * Parse deep-link components into a VerseReference. | ||||||
| * | ||||||
| * @param scheme The URI scheme ("metanoia", "https", or "http") | ||||||
| * @param host The URI host (for custom scheme URIs) | ||||||
| * @param pathSegments The path segments from the URI | ||||||
| * @return A VerseReference if the components are valid, null otherwise | ||||||
| */ | ||||||
| fun parseParts(scheme: String?, host: String?, pathSegments: List<String>): VerseReference? { | ||||||
| // Custom-scheme URIs (metanoia://bible/...) put "bible" in the host, | ||||||
| // not the path -- Uri parses "bible" as the authority there, so the | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ package com.bytecats.metanoia.settings | |
|
|
||
| import android.content.Context | ||
| import android.content.SharedPreferences | ||
| import com.bytecats.metanoia.update.ReleaseChannel | ||
|
|
||
| class SettingsManager(context: Context) { | ||
| private val prefs: SharedPreferences = context.getSharedPreferences("metanoia_settings", Context.MODE_PRIVATE) | ||
|
|
@@ -140,9 +141,26 @@ class SettingsManager(context: Context) { | |
| set(value) = prefs.edit().putString("scraper_user_agent", value).apply() | ||
|
|
||
| // --- Updates --- | ||
| /** Release channel for updates: STABLE, BETA, ALPHA, or NIGHTLY */ | ||
| var releaseChannel: ReleaseChannel | ||
| get() = ReleaseChannel.fromString(prefs.getString("release_channel", ReleaseChannel.STABLE.name)) | ||
| set(value) = prefs.edit().putString("release_channel", value.name).apply() | ||
|
Comment on lines
+145
to
+147
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Migrate the legacy nightly preference when the new key is absent. Existing installations can contain 🤖 Prompt for AI Agents |
||
|
|
||
| /** Enable/disable automatic update checking for the selected channel */ | ||
| var updatesEnabled: Boolean | ||
| get() = prefs.getBoolean("updates_enabled", true) | ||
| set(value) = prefs.edit().putBoolean("updates_enabled", value).apply() | ||
|
Comment on lines
+149
to
+152
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
ast-grep outline mobile/app/src/main/java/com/bytecats/metanoia/viewmodel/MainViewModel.kt \
--items all --view expanded
rg -n -C 5 \
'performAutoUpdate|fetchLatestForChannel\s*\(|fetchLatest\s*\(|availableUpdate|releaseChannel|updatesEnabled' \
mobile/app/src/main/java/com/bytecats/metanoiaRepository: 4cecoder/metanoia Length of output: 33848 🏁 Script executed: #!/bin/bash
set -euo pipefail
sed -n '80,125p' mobile/app/src/main/java/com/bytecats/metanoia/update/UpdateChecker.kt
sed -n '330,390p' mobile/app/src/main/java/com/bytecats/metanoia/update/UpdateChecker.kt
rg -n -C 3 'class ReleaseChannel|enum class ReleaseChannel|releaseChannel|updatesEnabled|startAutoUpdateLoop' mobile/app/src/main/java/com/bytecats/metanoiaRepository: 4cecoder/metanoia Length of output: 17185 Make the auto-update loop honor
🤖 Prompt for AI Agents |
||
|
|
||
| @Deprecated("Use releaseChannel instead", level = DeprecationLevel.WARNING) | ||
| var nightlyUpdatesEnabled: Boolean | ||
| get() = prefs.getBoolean("nightly_updates_enabled", false) | ||
| set(value) = prefs.edit().putBoolean("nightly_updates_enabled", value).apply() | ||
| set(value) { | ||
| prefs.edit().putBoolean("nightly_updates_enabled", value).apply() | ||
| // If enabling nightly, also switch to nightly channel for consistency | ||
| if (value) { | ||
| releaseChannel = ReleaseChannel.NIGHTLY | ||
| } | ||
| } | ||
|
|
||
| var lastUpdateCheckMillis: Long | ||
| get() = prefs.getLong("last_update_check_millis", 0L) | ||
|
|
@@ -151,4 +169,9 @@ class SettingsManager(context: Context) { | |
| var dismissedUpdateSha: String | ||
| get() = prefs.getString("dismissed_update_sha", "") ?: "" | ||
| set(value) = prefs.edit().putString("dismissed_update_sha", value).apply() | ||
| } | ||
|
|
||
| /** Last checked version for the current release channel */ | ||
| var lastCheckedVersion: String | ||
| get() = prefs.getString("last_checked_version", "") ?: "" | ||
| set(value) = prefs.edit().putString("last_checked_version", value).apply() | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -436,7 +436,7 @@ class GraphicsQualityManager( | |
| * Check if device supports compute shaders | ||
| */ | ||
| private fun supportsComputeShaders(): Boolean { | ||
| return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N | ||
| return true // Always true for minSdkVersion 28+ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Trace capability consumers and runtime graphics probes.
rg -n -C 5 '\bsupportsComputeShaders\b|GL_COMPUTE_SHADER|GLES31|compute[[:space:]-]?shader|computeShader' mobile/app/src/main/java
rg -n -C 3 'minSdk|compileSdk|targetSdk' mobileRepository: 4cecoder/metanoia Length of output: 7454 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== candidate files containing DeviceCapabilities/reference =="
rg -n -C 4 'DeviceCapabilities|int\.kotlin|deviceCapabilities|graphicsCapabilities|supportsComputeShaders|\bsupportsComputeShaders\b' mobile/app/src/main/java mobile/app/src/main/kotlin mobile -g '!**/README.md' || true
echo
echo "== GraphicsQualityManager relevant sections =="
wc -l mobile/app/src/main/java/com/bytecats/metanoia/ui/effects/core/GraphicsQualityManager.kt
sed -n '1,130p' mobile/app/src/main/java/com/bytecats/metanoia/ui/effects/core/GraphicsQualityManager.kt
sed -n '300,470p' mobile/app/src/main/java/com/bytecats/metanoia/ui/effects/core/GraphicsQualityManager.kt
sed -n '600,660p' mobile/app/src/main/java/com/bytecats/metanoia/ui/effects/core/GraphicsQualityManager.ktRepository: 4cecoder/metanoia Length of output: 40764 Probe compute-shader support instead of always returning true.
🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: 4cecoder/metanoia
Length of output: 18194
Document the database path from
context.filesDir.dbFileis constructed withFile(context.filesDir, "bible.db"), so the/data/data/...KDoc path does not describe the actual API contract. Describe the location ascontext.filesDir/bible.dbin app-private storage.🤖 Prompt for AI Agents