Skip to content

Apply upstream widget fixes (PR #289) to fork#2

Open
Copilot wants to merge 5 commits intomainfrom
copilot/update-fork-with-pr-289
Open

Apply upstream widget fixes (PR #289) to fork#2
Copilot wants to merge 5 commits intomainfrom
copilot/update-fork-with-pr-289

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 9, 2026

Ports EmmaTellblom#289 ("Widget fixes") into this fork. Widgets were not updating after calculation changes or across midnight/reboots.

New

  • PeriodCalculationWidgetUpdater — singleton that diffs the last known next-period date and fires widget updates only on change; @Volatile for thread safety

Modified

  • CalculationsHelper.nextPeriod() — calls PeriodCalculationWidgetUpdater.updateWidgetsIfPeriodChanged() on each DB-triggered recalculation
  • DatabaseUtils.createDatabase() — adds missing databaseVersion11() call so fresh installs get the unique index on periods.date / ovulations.date
  • app/build.gradle.kts — version bump 2.0 (24)2.1 (25)
  • Widget string names — renamed to encode all four variants explicitly (with_label_with_bg, no_label_with_bg, with_label_no_bg, no_label_no_bg); widget provider XMLs updated accordingly
  • gradlew — restored executable bit

Already present in this fork from PR #1: BootReceiver, BaseWidgetReceiver.onUpdate midnight-worker scheduling, MainActivity.updateWidgetsOnAppStart, and the corresponding AndroidManifest entries.

Original prompt

I have a fork from Mensinator source

In the repo there is a new pr 289 I want to make changes in my fork with that code

So I guess update my fork somehow?


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…getUpdater, version bump, DB v11, strings, widget providers

Co-authored-by: mrknutte26 <250676908+mrknutte26@users.noreply.github.com>
Copilot AI changed the title [WIP] Update fork with changes from PR 289 Apply upstream widget fixes (PR #289) to fork Mar 9, 2026
@mrknutte26 mrknutte26 marked this pull request as ready for review March 9, 2026 18:13
Copilot AI and others added 2 commits March 9, 2026 18:40
…nightTrigger emit

Co-authored-by: mrknutte26 <250676908+mrknutte26@users.noreply.github.com>
Fix widget updates: stale data after reboot, premature MidnightTrigger emit
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.

2 participants