diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-08-31 15:43:02 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-08-31 15:43:02 +0000 |
| commit | 0cd94d0821661fef3fc34b51011be95034e51a5b (patch) | |
| tree | ea91f813be8bbe0e5aac506744fcfbb22ce3ad41 /config | |
| parent | e42bfbd6a65eefd0f24677aebb74993ae56490cf (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.xml | 8 |
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: () -> Unit, onOpenLink: (String) -> Unit, onOpenBrowser: (String) -> Unit)</ID> - <ID>CyclomaticComplexMethod:ReaderScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable private fun ReaderContent( articleId: String, onBack: () -> Unit, onOpenLink: (String) -> Unit, onOpenBrowser: (String) -> Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -> Unit, onNext: () -> Unit, onNextKeepUnread: () -> Unit )</ID> + <ID>CyclomaticComplexMethod:ReaderScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable private fun ReaderContent( articleId: String, onBack: () -> Unit, onOpenLink: (String) -> Unit, onOpenBrowser: (String) -> Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -> Unit, onNext: () -> Unit, onNextKeepUnread: () -> Unit, fontSizePx: Int )</ID> <ID>LongMethod:AddFeedScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable fun AddFeedScreen(onDone: () -> Unit)</ID> <ID>LongMethod:ArticleListScreen.kt$@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class, ExperimentalCoroutinesApi::class) @Composable fun ArticleListScreen( feedId: String, onOpenArticle: (String) -> Unit, onBack: () -> Unit, onOpenFeedList: () -> 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: () -> Unit, onOpenLink: (String) -> Unit, onOpenBrowser: (String) -> Unit)</ID> <ID>LongMethod:MainActivity.kt$@Composable fun FeedReaderApp()</ID> <ID>LongMethod:ReaderExtractor.kt$ReaderExtractor.<no name provided>$override fun onPageFinished(view: WebView, finishedUrl: String)</ID> - <ID>LongMethod:ReaderScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable private fun ReaderContent( articleId: String, onBack: () -> Unit, onOpenLink: (String) -> Unit, onOpenBrowser: (String) -> Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -> Unit, onNext: () -> Unit, onNextKeepUnread: () -> Unit )</ID> + <ID>LongMethod:ReaderScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable private fun ReaderContent( articleId: String, onBack: () -> Unit, onOpenLink: (String) -> Unit, onOpenBrowser: (String) -> Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -> Unit, onNext: () -> Unit, onNextKeepUnread: () -> Unit, fontSizePx: Int )</ID> <ID>LongMethod:SettingsScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable fun SettingsScreen(onBack: () -> Unit)</ID> <ID>LongParameterList:ArticleListScreen.kt$( article: ArticleListItem, highlighted: Boolean, showFeedName: Boolean, showReadState: Boolean, onClick: () -> Unit, onMarkReadFrom: () -> 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) -> Unit, onOpenUnread: () -> Unit, onOpenOlder: () -> Unit, onOpenSaved: () -> Unit, onAddFeed: () -> Unit, onSettings: () -> Unit )</ID> - <ID>LongParameterList:ReaderScreen.kt$( articleId: String, onBack: () -> Unit, onOpenLink: (String) -> Unit, onOpenBrowser: (String) -> Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -> Unit, onNext: () -> Unit, onNextKeepUnread: () -> Unit )</ID> + <ID>LongParameterList:ReaderScreen.kt$( articleId: String, onBack: () -> Unit, onOpenLink: (String) -> Unit, onOpenBrowser: (String) -> Unit, hasPrevious: Boolean, hasNext: Boolean, onPrevious: () -> Unit, onNext: () -> Unit, onNextKeepUnread: () -> Unit, fontSizePx: Int )</ID> <ID>LongParameterList:ReaderScreen.kt$( feedId: String, articleId: String, onBack: () -> Unit, onOpenLink: (String) -> Unit, onOpenBrowser: (String) -> Unit, onNavigateToArticle: (String) -> Unit )</ID> <ID>LongParameterList:ReaderWebView.kt$( context: Context, onOpenLink: (String) -> Unit, onLongPressLink: (String) -> Unit = {}, onYouTubeVideo: (String) -> Unit = {}, onScrollChanged: (Int) -> Unit = {}, onPageFinished: (WebView) -> Unit = {} )</ID> <ID>LongParameterList:ReaderWebView.kt$( url: String, onDismiss: () -> Unit, onOpenInBrowser: () -> Unit, onShare: () -> Unit, onSaveToStash: () -> Unit, onSaveForLater: () -> 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$"<figure><a href=\"https://www.youtube.com/watch?v=$id\"><img src=\"https://i.ytimg.com/vi/$id/hq720.jpg\" alt=\"YouTube video\"></a><figcaption>▶ Watch on YouTube</figcaption></figure>"</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> |
