Main issue: we use the same list reference, leading to prefetched
cards bring added twice
The other issue was an off-by-one error in the count of cards to pre
render. This didn't matter too much, but we returned one more than was
requested
Fixes 8547
this is important because it is about to sunset, and if we do not
peel this off before we cut the release-2.15 branch, that branch
will no longer build without backporting
- API publishing needed a complete overhaul, tested locally, works
- JCenter is still needed for AnkiDroid as noted unfortunately...couple months to go
- Some artifact resolution performance complaints but local testing shows every single thing works
There was no reason to affect the whole note while only a card was changed. However, it was not a bug, even if it was
reverting siblings. Indeed, if this undo is executed, all changes made too siblings would have been undone previously
After installing a new version of ankidroid from master and syncing, I got the message
```
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference
at com.ichi2.anki.stats.AnkiStatsTaskHandler$DeckPreviewStatistics.onPostExecute(AnkiStatsTaskHandler.java:275)
at com.ichi2.anki.stats.AnkiStatsTaskHandler$DeckPreviewStatistics.onPostExecute(AnkiStatsTaskHandler.java:220)
at android.os.AsyncTask.finish(AsyncTask.java:755)
at android.os.AsyncTask.access$900(AsyncTask.java:192)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8107)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
```
I suspect that it is because collection or the db is empty (normal after a sync. )
* Added lint rule for use of UIUtils.showSnackbar instead of Snackbar.make
* Fixed the lint errors related to Snackbar.make
* Fixed inconsistent spacing
Co-authored-by: David Allison <62114487+david-allison-1@users.noreply.github.com>
- java needs a distribution now, "adopt" is best in my opinion
- cancel-workflow-action can kill all_but_latest now (I helped on that one, nice)
- nothing else that was breaking or worth using feature-wise
* feat: enable jacoco reports to be opened
* fix jacocoTestReport to run independently from other jacoco tasks
Co-authored-by: Mike Hardy <github@mikehardy.net>
The request code was unused, the base class uses a different value
setFragmentContentView is now unused, not deleted as it's tested
good code
Fixes 8616
Before this change, we performed this check on `onActivityResult`.
This was bad, as we had :
* onCreate -> startCollectionLoading -> onCollectionLoaded
* onActivityResult -> closeCollection -> crash
Now, by moving to the Preferences, we avoid this issue
There was also a bug that `mOldColPath` was not saved via
`onSaveInstanceState`, this meant "Don't Keep Activities" would cause
accessing the preferences to always reopen the collection
Fixes 8422
* NF: refactor variable usage
Removes usage of 'conf' allowing further refactor
* extract update_config and new_deck_config_legacy
004cc2b5f8
diff shows the extraction, method are renamed in the latest Rust
Its usage is discouraged in the Python, and we save a lot of
effort by not converting legacy code
We only had one usage. This code no longer exists in Anki's pylib
1cc63f9267/pylib/anki/decks.py (L51)
Previous `getAdapterPosition()` API was split to be non-ambiguous,
and `getBindingAdapterPosition()` seems like the correct option to use between
the two new APIs, as the listener appears to be viewed from the adapter context,
not the RecyclerView context (where `getAbsoluteAdapterPosition()` would be correct)
Additionally, `setHasFixed(true)` must not be used in layouts with wrap_content, as that implies
that the content is not fixed - this is a new lint check. Uses of `setHasFixedSize(true)` have been
removed in these contexts, with the downside being that RecyclerView cannot do some layout performance
optimizations, as it needs to check adapter size now during layout.
* Extract stream
* Invert if
* Extract exception to throws
* use .get(null) as it's a static call
* new UsageAnalytics.Actions().getClass -> UsageAnalytics.Actions.class
* Early return