summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-08-31 15:43:02 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-08-31 15:43:02 +0000
commit0cd94d0821661fef3fc34b51011be95034e51a5b (patch)
treeea91f813be8bbe0e5aac506744fcfbb22ce3ad41 /config
parente42bfbd6a65eefd0f24677aebb74993ae56490cf (diff)
Add reader font size setting, rewrite paywall-avoidance settings copy
Font size was hardcoded at 18px in ReaderWebView's injected CSS. Added a DataStore-backed setting (Settings.readerFontSizePx, 14-28px range) with a slider in Settings, threaded through ReaderScreen/ReaderContent into wrapReaderHtml. The reload-tracking key in ReaderContent's AndroidView now includes font size alongside content, so changing it and returning to an already-open article picks up the new size without reloading on every unrelated recomposition (matches the existing comment there about avoiding scroll-position jank). Rewrote the Settings screen's paywall note -- it read as defensive throat-clearing about what the app won't do. Restated as what it's actually for: avoiding tracking, manipulation, and junk fees, with reader mode pulling up anything findable by search anyway. Regenerated the detekt baseline: ReaderContent's pre-existing LongMethod/LongParameterList/CyclomaticComplexMethod findings are keyed by exact function signature text, and adding the fontSizePx parameter changed that text, invalidating the old baseline entries. The underlying debt (a 300+ line, 9-now-10-parameter composable) predates this change and isn't what this commit is about. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'config')
-rw-r--r--config/detekt/baseline.xml8
1 files changed, 3 insertions, 5 deletions
diff --git a/config/detekt/baseline.xml b/config/detekt/baseline.xml
index bd02fbe..9b48174 100644
--- a/config/detekt/baseline.xml
+++ b/config/detekt/baseline.xml
@@ -8,7 +8,7 @@
<ID>CyclomaticComplexMethod:FeedParser.kt$FeedParser$private fun parseAtom(parser: XmlPullParser): ParsedFeed</ID>
<ID>CyclomaticComplexMethod:FeedParser.kt$FeedParser$private fun parseRss(parser: XmlPullParser): ParsedFeed</ID>
<ID>CyclomaticComplexMethod:LinkReaderScreen.kt$@SuppressLint("SetJavaScriptEnabled") @OptIn(ExperimentalMaterial3Api::class) @Composable fun LinkReaderScreen(url: String, onBack: () -&gt; Unit, onOpenLink: (String) -&gt; Unit, onOpenBrowser: (String) -&gt; Unit)</ID>
- <ID>CyclomaticComplexMethod:ReaderScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable private fun ReaderContent( articleId: String, onBack: () -&gt; Unit, onOpenLink: (String) -&gt; Unit, onOpenBrowser: (String) -&gt; Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -&gt; Unit, onNext: () -&gt; Unit, onNextKeepUnread: () -&gt; Unit )</ID>
+ <ID>CyclomaticComplexMethod:ReaderScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable private fun ReaderContent( articleId: String, onBack: () -&gt; Unit, onOpenLink: (String) -&gt; Unit, onOpenBrowser: (String) -&gt; Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -&gt; Unit, onNext: () -&gt; Unit, onNextKeepUnread: () -&gt; Unit, fontSizePx: Int )</ID>
<ID>LongMethod:AddFeedScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable fun AddFeedScreen(onDone: () -&gt; Unit)</ID>
<ID>LongMethod:ArticleListScreen.kt$@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class, ExperimentalCoroutinesApi::class) @Composable fun ArticleListScreen( feedId: String, onOpenArticle: (String) -&gt; Unit, onBack: () -&gt; Unit, onOpenFeedList: () -&gt; Unit )</ID>
<ID>LongMethod:FeedFetchWorker.kt$FeedFetchWorker$private suspend fun fetchOne(feed: FeedEntity, db: AppDatabase): Int</ID>
@@ -18,12 +18,12 @@
<ID>LongMethod:LinkReaderScreen.kt$@SuppressLint("SetJavaScriptEnabled") @OptIn(ExperimentalMaterial3Api::class) @Composable fun LinkReaderScreen(url: String, onBack: () -&gt; Unit, onOpenLink: (String) -&gt; Unit, onOpenBrowser: (String) -&gt; Unit)</ID>
<ID>LongMethod:MainActivity.kt$@Composable fun FeedReaderApp()</ID>
<ID>LongMethod:ReaderExtractor.kt$ReaderExtractor.&lt;no name provided&gt;$override fun onPageFinished(view: WebView, finishedUrl: String)</ID>
- <ID>LongMethod:ReaderScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable private fun ReaderContent( articleId: String, onBack: () -&gt; Unit, onOpenLink: (String) -&gt; Unit, onOpenBrowser: (String) -&gt; Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -&gt; Unit, onNext: () -&gt; Unit, onNextKeepUnread: () -&gt; Unit )</ID>
+ <ID>LongMethod:ReaderScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable private fun ReaderContent( articleId: String, onBack: () -&gt; Unit, onOpenLink: (String) -&gt; Unit, onOpenBrowser: (String) -&gt; Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -&gt; Unit, onNext: () -&gt; Unit, onNextKeepUnread: () -&gt; Unit, fontSizePx: Int )</ID>
<ID>LongMethod:SettingsScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable fun SettingsScreen(onBack: () -&gt; Unit)</ID>
<ID>LongParameterList:ArticleListScreen.kt$( article: ArticleListItem, highlighted: Boolean, showFeedName: Boolean, showReadState: Boolean, onClick: () -&gt; Unit, onMarkReadFrom: () -&gt; Unit )</ID>
<ID>LongParameterList:Daos.kt$FeedDao$( id: String, title: String, siteUrl: String?, lastFetchedAt: Long, etag: String?, lastModified: String?, lastError: String? )</ID>
<ID>LongParameterList:FeedListScreen.kt$( onOpenFeed: (String) -&gt; Unit, onOpenUnread: () -&gt; Unit, onOpenOlder: () -&gt; Unit, onOpenSaved: () -&gt; Unit, onAddFeed: () -&gt; Unit, onSettings: () -&gt; Unit )</ID>
- <ID>LongParameterList:ReaderScreen.kt$( articleId: String, onBack: () -&gt; Unit, onOpenLink: (String) -&gt; Unit, onOpenBrowser: (String) -&gt; Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -&gt; Unit, onNext: () -&gt; Unit, onNextKeepUnread: () -&gt; Unit )</ID>
+ <ID>LongParameterList:ReaderScreen.kt$( articleId: String, onBack: () -&gt; Unit, onOpenLink: (String) -&gt; Unit, onOpenBrowser: (String) -&gt; Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -&gt; Unit, onNext: () -&gt; Unit, onNextKeepUnread: () -&gt; Unit, fontSizePx: Int )</ID>
<ID>LongParameterList:ReaderScreen.kt$( feedId: String, articleId: String, onBack: () -&gt; Unit, onOpenLink: (String) -&gt; Unit, onOpenBrowser: (String) -&gt; Unit, onNavigateToArticle: (String) -&gt; Unit )</ID>
<ID>LongParameterList:ReaderWebView.kt$( context: Context, onOpenLink: (String) -&gt; Unit, onLongPressLink: (String) -&gt; Unit = {}, onYouTubeVideo: (String) -&gt; Unit = {}, onScrollChanged: (Int) -&gt; Unit = {}, onPageFinished: (WebView) -&gt; Unit = {} )</ID>
<ID>LongParameterList:ReaderWebView.kt$( url: String, onDismiss: () -&gt; Unit, onOpenInBrowser: () -&gt; Unit, onShare: () -&gt; Unit, onSaveToStash: () -&gt; Unit, onSaveForLater: () -&gt; Unit )</ID>
@@ -54,8 +54,6 @@
<ID>MaxLineLength:Entities.kt$ArticleEntity$val readAt: Long? = null</ID>
<ID>MaxLineLength:LinkReaderScreen.kt$loadDataWithBaseURL(url, wrapReaderHtml(currentExtractedContent, extractedTitle), "text/html", "UTF-8", null)</ID>
<ID>MaxLineLength:LinkReaderScreen.kt$webView.loadDataWithBaseURL(url, wrapReaderHtml(currentExtractedContent, extractedTitle), "text/html", "UTF-8", null)</ID>
- <ID>MaxLineLength:ReaderScreen.kt$loadDataWithBaseURL(baseUrl, wrapReaderHtml(content, article?.title, article?.publishedAt, article?.imageUrl), "text/html", "UTF-8", null)</ID>
- <ID>MaxLineLength:ReaderScreen.kt$webView.loadDataWithBaseURL(baseUrl, wrapReaderHtml(content, article?.title, article?.publishedAt, article?.imageUrl), "text/html", "UTF-8", null)</ID>
<ID>MaxLineLength:ReaderWebView.kt$"&lt;figure&gt;&lt;a href=\"https://www.youtube.com/watch?v=$id\"&gt;&lt;img src=\"https://i.ytimg.com/vi/$id/hq720.jpg\" alt=\"YouTube video\"&gt;&lt;/a&gt;&lt;figcaption&gt;▶ Watch on YouTube&lt;/figcaption&gt;&lt;/figure&gt;"</ID>
<ID>MaxLineLength:SettingsScreen.kt$DropdownMenuItem(text = { Text("Highlight") }, onClick = { newRuleAction = FilterAction.HIGHLIGHT; actionMenuExpanded = false })</ID>
<ID>MaxLineLength:SettingsScreen.kt$DropdownMenuItem(text = { Text("Mute") }, onClick = { newRuleAction = FilterAction.MUTE; actionMenuExpanded = false })</ID>