Skip to content

Commit

Permalink
refactor: remove 'corrupt' custom study handling
Browse files Browse the repository at this point in the history
I remember fixing the underlying cause in 2020
  • Loading branch information
david-allison committed Dec 18, 2024
1 parent a66f31d commit 71a4e8a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import anki.scheduler.CustomStudyRequestKt
import anki.scheduler.customStudyRequest
import com.ichi2.anki.CollectionManager.TR
import com.ichi2.anki.CollectionManager.withCol
import com.ichi2.anki.CrashReportService
import com.ichi2.anki.R
import com.ichi2.anki.analytics.AnalyticsDialogFragment
import com.ichi2.anki.dialogs.customstudy.CustomStudyDialog.ContextMenuOption
Expand Down Expand Up @@ -462,15 +461,6 @@ class CustomStudyDialog(
return
}
}
if (!dyn.has("terms")) {
// #5959 - temp code to diagnose why terms doesn't exist.
// normally we wouldn't want to log this much, but we need to know how deep the corruption is to fix the
// issue
Timber.w("Invalid Dynamic Deck: %s", dyn)
CrashReportService.sendExceptionReport("Custom Study Deck had no terms", "CustomStudyDialog - createCustomStudySession")
showThemedToast(requireContext(), getString(R.string.custom_study_rebuild_deck_corrupt), false)
return
}
// and then set various options
dyn.put("delays", JSONObject.NULL)
val ar = dyn.getJSONArray("terms")
Expand Down
1 change: 0 additions & 1 deletion AnkiDroid/src/main/res/values/03-dialogs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<string name="custom_study_forgotten">Review cards forgotten in last x days:</string>
<string name="custom_study_ahead">Review ahead by x days:</string>
<string name="custom_study_preview">Preview new cards added in the last x days:</string>
<string name="custom_study_rebuild_deck_corrupt">Could not rebuild custom study deck</string>

<string name="storage_full_title">Storage full</string>
<string name="storage_almost_full_title">Storage almost full</string>
Expand Down

0 comments on commit 71a4e8a

Please sign in to comment.