Skip to content

[pull] main from ankidroid:main#440

Closed
pull[bot] wants to merge 1989 commits into
MoYiha:mainfrom
ankidroid:main
Closed

[pull] main from ankidroid:main#440
pull[bot] wants to merge 1989 commits into
MoYiha:mainfrom
ankidroid:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Jul 17, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull Bot locked and limited conversation to collaborators Jul 17, 2025
@pull pull Bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Jul 17, 2025
david-allison and others added 27 commits April 25, 2026 01:33
If a LTR field name was used in RTL mode, the toggle sticky pin and the
content overlapped

Fixes 20842
Before this change, widgets depended on `ACTION_TIME_TICK` OR
 `android:updatePeriodMillis`.

If the app was closed, `ACTION_TIME_TICK` did not fire.

`android:updatePeriodMillis` is sometimes blocked by OEMs, and
AlarmManager, and it's not guaranteed to execute on the hour.

`AlarmManager.setWindow` reduces this discrepancy to 10 minutes (the
reasonable minimum for setWindow), and is less likely to be blocked.

Fixes 14372

Assisted-by: Claude Opus 4.7 - initial implementation, was heavily
refactored
a card like section that can be used on settings screens to link to other screens and preferences

it helps the navigation by linking related stuff
to reduce the indent generated by our formatter
Cause: 0da67f4

Moving to a `java-library` bundled a second copy of `org.json` which
uses an incompatible `JSONWriter`.

On a release build, R8 inlining causes a crash.

`compileOnly` ensures the JAR is not copied over, and the Android
 `org.json` implementation is used

Fixes 20852

Assisted-by: Claude Opus 4.7 - explaining the bug
There were multiple issues caused by the combination of a Tab layout and
 a Dialog Fragment with variable height

In particular, `requestLayout` in `onResume` while RTL was enabled
caused the tab selection to revert to a past value, meaning the dialog
was unusable in Arabic

To fix this, make the dialog fullscreen/full height, so `requestLayout`
is not necessary, and fix the widths of the dialog to be the width of
the screen

The same top bar layout as FilteredDeckOptionsFragment was used

Fixes 20834 for ChangeNoteTypeDialog

Assisted-by: Claude Opus 4.7 - implementation
I feel we may want to make this larger, so it's worthwhile to
standardize it now
There were multiple issues caused by the combination of a Tab layout and
a Dialog Fragment with variable height

In particular, `requestLayout` in `onResume` while RTL was enabled
caused the tab selection to revert to a past value, meaning the dialog
was unusable in Arabic

To fix this, make the dialog fullscreen/full height, so `requestLayout`
is not necessary, and fix the widths of the dialog to be the width of
the screen

The same top bar layout as FilteredDeckOptionsFragment was used

Fixes 20834

Assisted-by: Claude Opus 4.7 - implementation
If a duplicate mapping was made, 'Card 2' would be updated to 'Nothing'
in the ViewModel, but this was not reflected in the UI, causing a
surprising 'will remove the following cards' warning

Reproduction/fix steps:
* Basic (optional reversed card)
* Change 'Card 1' to 'Card 2'
* 'Card 2' should now be mapped to nothing

Fixes 20843

Assisted-by: Claude Opus 4.7 - diagnostics
calling `requireContext()` after leaving the fragment caused a crash.

Fixed by storing the value of whether the system is using gestures navigation instead of retrieving it every time.

If the user changes the gestures navigation mode while using the reviewer, the activity and fragment are recreated, so that ends up not being a problem

java.lang.IllegalStateException: Fragment ReviewerFragment{a6a61db} (47dfdd3d-a8b4-49be-ad89-2e879c2630b8) not attached to a context.
at androidx.fragment.app.Fragment.requireContext(Fragment.java:977)
at com.ichi2.anki.ui.windows.reviewer.ReviewerFragment.setupWhiteboard$lambda$1(ReviewerFragment.kt:554)
at com.ichi2.anki.ui.windows.reviewer.ReviewerFragment.setupWhiteboard$lambda$1(ReviewerFragment.kt:554)
if `Suspend` wasn't on the menu actions, the `Bury` wouldn't be updated to `Bury card` when necessary
in case the menu items don't exist

it also makes the method more consistent and restricts the scope of the variables
only whiteboard gestures worked. Now, if the gestures can trigger other actions from the reviewer as well.
Issue 20816

Assisted-by: Claude Opus 4.7 - discussion, rubber duck
criticalAY and others added 29 commits May 22, 2026 11:21
Removes the openMultimediaImageFragment helper. Bottom-sheet dispatch
and the paste path now build their launch intents through the same
handler.
handleMultimediaActions, handleMultimediaResult, performAddMedia and
the multimediaActionJob state now live on a NoteEditorMultimediaController.
The fragment keeps the ActivityResultLauncher registration (framework
requirement) and forwards its callback.
The paste-image path now delegates to launchImagePaste, mirroring the
bottom-sheet dispatch. pastedImageCache and its savedInstanceState
plumbing move with it; the fragment forwards save/restore through
onSaveInstanceState / onRestoreInstanceState on the controller.
onPaste moves; shouldPasteAsPng stays on the fragment because the
paste listener is synchronous.
…ract

test: cover NoteEditorMultimediaController save/restore plumbing
Introduce deleteProfile() for removing a single user profile.
Deletion removes both the registry entry (SharedPreferences) and
the on-disk data directory. The only guard is: the currently active
profile cannot be deleted, all other profiles including default
are deletable.
Was: `\[\\]`
Now: `\[\]`

Fixes 20961
Issue 20961

Assisted-by: Claude Opus 4.7 - most of the code
Consolidates the code that was starting DeckSelectionDialog into just
two methods for Activity/Fragment. The calling sites now don't have to
manually get the decks they want to show.

Note:
DeckPickerWidgetConfig class was filtering the decks shown by
DeckSelectionDialog to remove already selected decks. To simplify the
new implementation this was disabled, but the current code in the
activity handles this scenario.
Will be reimplemented in the future, most likely in DeckSelectionDialog.
Extra step in removing DeckSpinnerSelection
The single method from the file was inlined at the only place it was
used.

Some leftover todos were not really relevant anymore and were removed.
Use the Kotlin 'Duration'

Assisted-by: Claude Opus 4.7 - review
Simple KeyEvent digit helpers with no project dependencies. Lives in
:common:android since it uses android.view.KeyEvent.
The deck picker widget config anchors snackbars to the FAB so they sit above it.

Fall back to the Save button when the FAB is not visible, so snackbars
always clear the bottom button row.
…t config

When the user's collection has no decks, the deck-picker widget config was showing "AnkiDroid is not initialized yet. Please open AnkiDroid and
try again" before closing. The collection is fully initialized in that case the user just has no decks to pick from and re-opening the app won't change anything.

Use empty_collection_state_in_widget ("Collection is empty, use app to add decks then reconfigure") instead, which is already the message the widget itself shows in the same situation, keeping the config and the
widget consistent.
Captures the current direction on Jetpack Compose adoption based on
discussion with maintainers.
@MoYiha MoYiha closed this May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.