Skip to content

feat(mastodon): add Mastodon home timeline source#62

Open
johanneswilm wants to merge 12 commits into
NeoApplications:mainfrom
johanneswilm:feature/mastodon-source
Open

feat(mastodon): add Mastodon home timeline source#62
johanneswilm wants to merge 12 commits into
NeoApplications:mainfrom
johanneswilm:feature/mastodon-source

Conversation

@johanneswilm

@johanneswilm johanneswilm commented Jul 10, 2026

Copy link
Copy Markdown

This PR adds support for Mastodon home timelines as a content source in Neo Feed.

What it does:

  • Adds an "Add Mastodon account" option in the sources overflow menu.
  • Lets the user enter their instance (e.g. mastodon.social), then authenticates via the standard Mastodon OAuth flow in a Custom Tab.
  • Stores the access token encrypted with EncryptedSharedPreferences.
  • Fetches the authenticated account's home timeline and turns posts into feed articles.
  • Adds per-source Mastodon filters: hide replies, require a link, require an image. Changing these clears the cached articles for that source and resyncs so the filters apply immediately.
  • Adds a global "Blocked words" setting that filters out articles (existing and newly fetched) whose title/description/content contain any blocked word.
  • Adds a separate "Max Mastodon items per feed" setting so Mastodon posts don't drown out RSS feeds.
  • Fixes a crash when opening the article filter bottom sheet caused by an unresolved theme attribute.
  • Keeps all Mastodon code isolated in the "manager.mastodon" package and switches feeds by a new "sourceType" column, making it easy to maintain as a near-plugin.

Database: adds sourceType, requireLink, requireImage and excludeReplies columns via migrations 8→9, 9→10 and 10→11. Existing RSS feeds default to 'rss'.

Closes the request to add Mastodon home-timeline support to Neo Feed.

Add support for Mastodon home timelines as a feed source.

- New com.saulhdev.feeder.manager.mastodon package with OAuth registration,
  token exchange, secure EncryptedSharedPreferences storage, API client,
  and status-to-article parser.
- New SourceListPage menu item to add a Mastodon account.
- MastodonAddPage + MastodonCallbackPage handle the OAuth flow using
  nf-mastodon://callback deep links.
- Feed model extended with sourceType column (DB migration 8→9) so Mastodon
  sources are identified cleanly instead of misusing URL schemes.
- RssLocalSync dispatches Mastodon feeds to MastodonFeedSync and keeps the
  RSS path unchanged.
- New preference 'Max Mastodon items per feed' (default 20) to prevent the
  timeline from overwhelming RSS sources.
- Strings added in English and French.
…writing edits

The edit page is shown inside a ListDetailPaneScaffold and the ViewModel
is activity-scoped, so the cached StateFlow can contain stale values after
saving. Load the feed directly from the repository when the page opens, and
stop resetting editState on every viewState emission so user toggles are not
overwritten before save.
… words

The blocked-words filter only applied to articles fetched after the word was
added. When a word is added or removed, scan existing enabled articles and
delete those whose title/description/content contain any blocked word.
The nav_bar_bg view uses ?attr/bottomSheetNavBarColor, which is not defined
in the system's bottom-sheet dialog theme overlay and caused an inflation
crash when opening the filter sheet. Use a direct translucent color instead.
@johanneswilm
johanneswilm marked this pull request as ready for review July 11, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant