0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 20:03:05 +02:00

fix: use new stats instance on collection change

Introduced in 4809c77a44

Related: 6192 - not the cause, but a fix fails
This commit is contained in:
David Allison 2021-05-04 05:06:01 +01:00 committed by Mike Hardy
parent 1823d8bfc4
commit c2f0f48762

View File

@ -64,7 +64,7 @@ public class AnkiStatsTaskHandler {
}
public synchronized static AnkiStatsTaskHandler getInstance(Collection collection) {
if (sInstance == null) {
if (sInstance == null || sInstance.mCollectionData != collection) {
sInstance = new AnkiStatsTaskHandler(collection);
}
return sInstance;