Search is not available for this dataset
hash
string
author
int32
committer_date
string
timezone
int64
parents
string
message
string
changes
string
language
string
cf434f10ed8556679f8256ee11729d61d27d789d
30
2020-04-08 14:10:24-05:00
-3,600
['e7c0048dafc6f047046c38114ef4a4052999264e']
URLEncode data before sending to Java Fixes #5944 Previously, only some data was encoded. When an invalid sequence (single %) was entered, then the app would crash due to the decode failure. We both fix this encoding in the JS, and if invalid data comes in for any reason, we show an error.
[{'old_path': 'AnkiDroid/src/main/assets/scripts/card.js', 'new_path': 'AnkiDroid/src/main/assets/scripts/card.js', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -96,7 +96,9 @@ function buttonAnswerEase4() {\n \n /* Tell the app the text in the input box when it loses focus */\n function taBlur(itag) {\n- window...
Kotlin
69a825298f5235778dc13562a05a036b00eaba3c
45
2020-04-09 11:38:34-05:00
-7,200
['cf434f10ed8556679f8256ee11729d61d27d789d']
current.getLong("id") to selected selected() returns the id. Current is defined as get(selected()). So doing current.getLong("id") takes the id, get the deck, and then takes the id.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1711,8 +1711,9 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity {\n ...
Kotlin
ad10b0360b65bdb968fc2017b63277e7d10af94a
45
2020-04-09 12:07:42-05:00
-7,200
['69a825298f5235778dc13562a05a036b00eaba3c']
Cache name normalization Profiling Ankidroid, I realized that ankidroid spent 12 seconds on startup in the method normalize. That's far too much. I actually have trouble believing the profiler here. (More precisely it mostly spent time in "toLowerCase") Anyway, I added this simple caching method, so that it becomes f...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1007,10 +1007,12 @@ public class Decks {\n * utils methods\n * **************************************\n */\n+ pri...
Kotlin
6a241e2f3bf2832c9b22b27bf5cf8a60ee14bead
30
2020-04-09 13:09:11-05:00
-3,600
['ad10b0360b65bdb968fc2017b63277e7d10af94a']
NF: Add Custom Study Logging Added to diagnose the path taken to cause #5959 (dynamic deck had no 'terms') inside 'createCustomStudySession'.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/dialogs/CustomStudyDialog.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/dialogs/CustomStudyDialog.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -21,6 +21,8 @@ import android.content.SharedPreferences;\n import android.content.res.Resources;\n...
Kotlin
89e61ef591dc26aa0e533a18a6ee6daa5ee305d8
30
2020-04-09 13:09:11-05:00
-3,600
['6a241e2f3bf2832c9b22b27bf5cf8a60ee14bead']
NF: Rename variable for clarity
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/dialogs/CustomStudyDialog.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/dialogs/CustomStudyDialog.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -424,7 +424,7 @@ public class CustomStudyDialog extends AnalyticsDialogFragment {\n final ...
Kotlin
2ce7139b80223a40526d6ad7bd2f1af5d7c99bb3
30
2020-04-09 13:09:11-05:00
-3,600
['89e61ef591dc26aa0e533a18a6ee6daa5ee305d8']
Replaced crash with toast & error report We can't fix the deck properties yet as we haven't diagnosed the issue but, we can stop the crash.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/dialogs/CustomStudyDialog.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/dialogs/CustomStudyDialog.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -39,6 +39,7 @@ import com.ichi2.anki.CollectionHelper;\n import com.ichi2.anki.DeckOptions;\n impo...
Kotlin
436a044cbae40203d4f6b058077d8cb5a6af8a19
45
2020-04-09 15:02:35-05:00
-7,200
['c6291ef91fdb2fc85bd852702541d0fad2257ed3']
Loading models after GUI is shown My AnkiDroid is really slow to start. According to profiling, the slowest part is reading the database content. In particular, reading the json configurations. Those are JSON files which may easily takes more than a MB and does not fit into the cursor. Note type are not required to s...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -2122,6 +2122,7 @@ public class DeckPicker extends NavigationDrawerActivity implements\n \n // Update the mini s...
Kotlin
a0957344677d3b13d7fbc9aa661db94c12cc3e6f
45
2020-04-09 17:17:10-05:00
-7,200
['436a044cbae40203d4f6b058077d8cb5a6af8a19']
Collapsing a deck get quick Currently, collapsing a deck calls `updateDeckList`. This methods recompute the number of cards to review in each deck and subdecks. On my collection, it's a 30 seconds long operation. This operation is totally useless when decks get collapsed since this does not change the deck hierarchy a...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -183,6 +183,8 @@ public class DeckPicker extends NavigationDrawerActivity implements\n \n private String mExportFileName;\n ...
Kotlin
ccc976a61f15e4fc4eb125895841701bcf63e5a7
80
2020-04-09 17:29:58-05:00
18,000
['a0957344677d3b13d7fbc9aa661db94c12cc3e6f']
Bumped version to 2.10alpha65 @branch-specific
[{'old_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'new_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -22,8 +22,8 @@\n xmlns:tools="http://schemas.android.com/tools"\n package="com.ichi2.anki"\n android:installLocation="auto"\n- ...
Kotlin
6de657639e25773d03b1f181c52ed0349fcce67c
45
2020-04-10 09:17:42-05:00
-7,200
['ccc976a61f15e4fc4eb125895841701bcf63e5a7']
Long string from debug to verbose When I run ankidroid, the "debug" logcat gets crowded by a few VERY long messages. The one containing some card content (css, question, card content...) I move this to verbose, because it's very verbose. It would be nice by the way to have rules stating what kind of message should u...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1883,7 +1883,7 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity {\n ...
Kotlin
c200513e28782cfa529f1686cccf883e7141c5aa
45
2020-04-10 12:35:01-05:00
-7,200
['6de657639e25773d03b1f181c52ed0349fcce67c']
Replace getDeclaredMethod by lambda This allow inheritance to work, and thus is required in next commits.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/AbstractSched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/AbstractSched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -147,4 +147,12 @@ public abstract class AbstractSched {\n Arrays.toString(names), did, depth, re...
Kotlin
2db79c321e8580741f6ba8cd0d85b95cfa44db3a
45
2020-04-10 12:35:01-05:00
-7,200
['c200513e28782cfa529f1686cccf883e7141c5aa']
Remove indentation Because of removed try
[]
Kotlin
ac1e064b3dab56a88cbbc0acfe3e8005d3ca40e0
45
2020-04-10 12:35:01-05:00
-7,200
['2db79c321e8580741f6ba8cd0d85b95cfa44db3a']
Replace "none" by "null" in comments It's java and not python. Porting those comments literally is useless
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Models.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Models.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -265,7 +265,7 @@ public class Models {\n }\n \n \n- /** get model with ID, or none. */\n+ /** get model with ID, or null...
Kotlin
8ada06b2e6521aa4e9eff2a0539dc192ef89a894
45
2020-04-10 12:35:01-05:00
-7,200
['ac1e064b3dab56a88cbbc0acfe3e8005d3ca40e0']
move Scheds into a package This way Sched can inherits from SchedV2 as in anki, using protected variables and method betwen them
[{'old_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/ContentProviderTest.java', 'new_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/ContentProviderTest.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -38,10 +38,8 @@ import com.ichi2.libanki.Card;\n import com.ichi2.libanki.Collection...
Kotlin
b6b53b47795b22ab1553367beb5cb986493b021c
45
2020-04-10 12:35:01-05:00
-7,200
['8ada06b2e6521aa4e9eff2a0539dc192ef89a894']
Sched inherits from SchedV2 Deletions are copied from dae/anki@961026b04b2a13415d8f1a6cdf92dfc1835ca737 and inheritance from dae/anki@8c3e4a8beeffa6e3d0cb90b0d4d1d0d80a671327 dae/anki@1c09d80558b061be66b41bef0febdccaa35f59c5 is ignored because useless in a typed language
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -59,7 +59,7 @@ import timber.log.Timber;\n @SuppressWarnings({"PMD.ExcessiveClassLength", "PMD.AvoidThrowingRawException...
Kotlin
9f68389cc18c415032d42b9d0c5bad923e3ec75c
45
2020-04-10 12:35:01-05:00
-7,200
['b6b53b47795b22ab1553367beb5cb986493b021c']
reuse v2's _logRev() As in dae/anki@2079854d3f6504c411daf0ecbe299a83f81d9c20
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -851,7 +851,7 @@ public class Sched extends SchedV2 {\n } else {\n _rescheduleRev(card, ease);\n ...
Kotlin
9cfc1e3ce67eafdcff11392bf68ff9939ae1ea93
45
2020-04-10 12:35:01-05:00
-7,200
['9f68389cc18c415032d42b9d0c5bad923e3ec75c']
reuse _deckNewLimitSingle() As is dae/anki@e8bdd8616b01d636d1a229ac64b3923d4642d8f1
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -378,15 +378,6 @@ public class Sched extends SchedV2 {\n }\n \n \n- /* Limit for deck without parent limits. */\n...
Kotlin
5401fa220fd7e376e00abae0351c35299e2eb74c
45
2020-04-10 12:35:01-05:00
-7,200
['9cfc1e3ce67eafdcff11392bf68ff9939ae1ea93']
reuse _leftToday() As in dae/anki@f054fa14d618393ccf0c14218fef11669745935b
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -592,29 +592,6 @@ public class Sched extends SchedV2 {\n }\n \n \n- /* the number of steps that can be completed ...
Kotlin
e0b5f7bd357978a4ab45faddeb1a6e2045719ab0
45
2020-04-10 12:35:01-05:00
-7,200
['5401fa220fd7e376e00abae0351c35299e2eb74c']
use _deckLimit() in a few more places As in dae/anki@c14132332b5773e8b973954c949cbde790ad3b9b
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -195,7 +195,7 @@ public class Sched extends SchedV2 {\n \n private void unburyCardsForDeck(List<Long> allDecks) {\n ...
Kotlin
f0d9a9de123ad42327d172e67735d705efadb391
45
2020-04-10 12:35:01-05:00
-7,200
['e0b5f7bd357978a4ab45faddeb1a6e2045719ab0']
remove a few more common methods As in dae/anki@e95eea68ecae32f38170c1067bf5e3dbf0a66299
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -378,10 +378,6 @@ public class Sched extends SchedV2 {\n }\n \n \n- public int totalNewForCurrentDeck() {\n- ...
Kotlin
f44220acdbef26a99a4fa6730e60d5c841284a6d
45
2020-04-10 12:35:01-05:00
-7,200
['71640981eafcbd05368bab73c03d2f05ceb319fe']
oldToday is Integer because mToday is Integer and can be null. This deals with the fact that mToday used to be int in Sched and Integer ind SchedV2 and still keep correct behaviour
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1246,7 +1246,7 @@ public class Sched extends SchedV2 {\n \n @Override\n protected void _updateCutoff() {\n- ...
Kotlin
7f1814b7313c0776503bafbb7d642579fb9f1418
45
2020-04-10 12:35:01-05:00
-7,200
['f44220acdbef26a99a4fa6730e60d5c841284a6d']
_cntFnRev public Because otherwise _walkingCount can't access it.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/Sched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -742,7 +742,8 @@ public class Sched extends SchedV2 {\n \n // Dynamically invoked in _walkingCount, passed as a para...
Kotlin
ce23d097c3af0675ccfa70407bfcbafc6c7b77f3
30
2020-04-10 13:39:54-05:00
-3,600
['7f1814b7313c0776503bafbb7d642579fb9f1418']
Extract: WebViewDebugging.initializeDebugging I want to use this API from #1377
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -105,6 +105,7 @@ import com.ichi2.utils.FunctionalInterfaces.Function;\n import com.ichi2.utils.JSONAr...
Kotlin
20e9143f34b64a1417efb50dcd27e1fb249e9a02
30
2020-04-10 13:39:54-05:00
-3,600
['ce23d097c3af0675ccfa70407bfcbafc6c7b77f3']
WebViewDebugging: Disable on unset preference If the preference is unset, disable it the next time we use it.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/utils/WebViewDebugging.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/utils/WebViewDebugging.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -9,9 +9,9 @@ public class WebViewDebugging {\n public static void initializeDebugging(SharedPreferences shared...
Kotlin
bb0fa29cb1f203f2ed24c85e424f620e6b56c6dd
30
2020-04-10 13:39:54-05:00
-3,600
['20e9143f34b64a1417efb50dcd27e1fb249e9a02']
WebViewDebugging: Handle on startup When testing (printf), this has no noticeable difference if the setting is off, and shaved 2ms off the call if it's on
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AnkiDroidApp.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AnkiDroidApp.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -45,6 +45,7 @@ import com.ichi2.compat.CompatHelper;\n import com.ichi2.utils.LanguageUtil;\n import com.ichi2.anki.analytic...
Kotlin
29170861da5f0b2b1adf364723cf484f744216de
30
2020-04-10 14:05:03-05:00
-3,600
['bb0fa29cb1f203f2ed24c85e424f620e6b56c6dd']
Add Disable Extended Text UI Preference #5533 This allows 'Cloze Deletion' to be shown in Landscape mode.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/FieldEditText.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/FieldEditText.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -2,14 +2,19 @@\n package com.ichi2.anki;\n \n import android.content.Context;\n+import android.content.SharedPreferences;\...
Kotlin
231aae7ddd1ee513126892c794504d37303f78e5
45
2020-04-10 15:32:41-05:00
-7,200
['29170861da5f0b2b1adf364723cf484f744216de']
Reset done a single time on scheduler openinig On my collection and my phone, scheduler's reset take 4 seconds. It's done twice when reviewer is opened from deck picker. This is because: * to check whether the deck can be reviewer, reset is done to see the correct number of card * when reviewer starts, it calls rese...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -2351,6 +2351,7 @@ public class DeckPicker extends NavigationDrawerActivity implements\n \n private void openReviewer() {\n ...
Kotlin
8377f8eab35c55fa81029999b1dd1e92ab3aaba6
45
2020-04-10 15:57:29-05:00
-7,200
['231aae7ddd1ee513126892c794504d37303f78e5']
Remove sublist from Decks.parents I really don't understand why, but the profiler states that one and a half seconds are spent in the sublist iterator. So I remove it and do a direct access. I believe that the little increase in code complexity is not worth so much time
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -932,7 +932,8 @@ public class Decks {\n // get parent and grandparent names\n List<String> parents = new ArrayList<>...
Kotlin
d490fe531b70a50510f5dd19374a54d6d2213583
80
2020-04-10 16:33:44-05:00
18,000
['57cb6d37741bff8f92a80a568a6483bc0c1693db']
Bumped version to 2.10alpha66 @branch-specific
[{'old_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'new_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -22,8 +22,8 @@\n xmlns:tools="http://schemas.android.com/tools"\n package="com.ichi2.anki"\n android:installLocation="auto"\n- ...
Kotlin
85fff5a0fd3c6f995ced58d2239ca7b8a727b793
80
2020-04-11 11:23:27-05:00
18,000
['44aea97c2d8c69834a64967c40be59d7d05cc0db']
Bumped version to 2.10alpha67 @branch-specific
[{'old_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'new_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -22,8 +22,8 @@\n xmlns:tools="http://schemas.android.com/tools"\n package="com.ichi2.anki"\n android:installLocation="auto"\n- ...
Kotlin
0973cc61c1fa940d50443535def897f52356be9e
45
2020-04-11 19:48:59-05:00
-7,200
['85fff5a0fd3c6f995ced58d2239ca7b8a727b793']
Make comparison quicker First, I want to emphasize that, on my collection, I am spending two seconds in the method Long.valueOf(long). Of those two seconds, 1.1 are spent in the compare method in _fillLrn. So it's a not a change for fun, it's a real time saver I want to do here. Secondly, Long.valueOf().compareTo use...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/SchedV2.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/SchedV2.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -764,7 +764,7 @@ public class SchedV2 extends AbstractSched {\n Collections.sort(mLrnQueue, new Comparat...
Kotlin
5569d28c3865b0a56aafd2172694a4f86b1a7ba4
45
2020-04-11 20:21:10-05:00
-7,200
['0973cc61c1fa940d50443535def897f52356be9e']
Prepared queries In order to improve speed of code, preparred queries are better than creating queries where values change. So here they are. It also adds a few methods in libanki/DB.java in order to allow more preparred queries. Queries with IN are not entirely preparred. This is because ? can only be replaced by c...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/stats/OverviewStatsBuilder.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/stats/OverviewStatsBuilder.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -237,9 +237,9 @@ public class OverviewStatsBuilder {\n // Fill in the overview stats\n ...
Kotlin
0754ccfc42b1009c843ae8efe0290221928f5d8d
30
2020-04-12 09:30:55-05:00
-3,600
['5569d28c3865b0a56aafd2172694a4f86b1a7ba4']
LINT: Replace try..close with try-with-resources Automated lint fix from Android Studio (except 1, which involved moving a nll variable, then an auto fix) Finally, manual undo of the whitespace changes. Available on all API levels: In addition to the Java 8 language features and APIs above, Android Studio 3.0 and la...
[{'old_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/ContentProviderTest.java', 'new_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/ContentProviderTest.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -389,16 +389,13 @@ public class ContentProviderTest {\n cv.put(FlashCard...
Kotlin
c746beb643fdb67b43e4f436f4c01a26266feadc
30
2020-04-12 09:35:25-05:00
-3,600
['0754ccfc42b1009c843ae8efe0290221928f5d8d']
Extract and modify: getNextClozeIndex I want to access this functionality from the Visual Editor without a reference to FieldEditText. This also likely improves performance, taking the Regex.Compile from an instance variable into a static.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/NoteEditor.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/NoteEditor.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -73,6 +73,7 @@ import com.ichi2.libanki.Card;\n import com.ichi2.libanki.Collection;\n import com.ichi2.libanki.Consts;\n import...
Kotlin
d9fd016d501dcd6472f3d170e23c35aca408f60e
30
2020-04-12 09:35:25-05:00
-3,600
['c746beb643fdb67b43e4f436f4c01a26266feadc']
NF: Fix Javadoc Co-Authored-By: Mike Hardy <github@mikehardy.net>
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Note.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Note.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -384,10 +384,13 @@ public class Note implements Cloneable {\n public static class ClozeUtils {\n private static final Patt...
Kotlin
95672824d6fb3e6a50ade618e1ed6fd767d815fb
30
2020-04-12 09:38:57-05:00
-3,600
['d9fd016d501dcd6472f3d170e23c35aca408f60e']
Speed up tests Each test calls AnkiDroidApp.onCreate which plants a Timber config This causes a lot of log noise, and slows down the tests Before: 3m19s 3m14s After: 2m51s 2m52 25 second reduction
[{'old_path': 'AnkiDroid/src/test/java/com/ichi2/anki/RobolectricTest.java', 'new_path': 'AnkiDroid/src/test/java/com/ichi2/anki/RobolectricTest.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -33,6 +33,7 @@ import org.robolectric.shadows.ShadowLog;\n \n import androidx.sqlite.db.framework.FrameworkSQLiteOpenH...
Kotlin
8060018cb832915f4b900f0bb62d4853ff741d8f
30
2020-04-12 10:09:14-05:00
-3,600
['95672824d6fb3e6a50ade618e1ed6fd767d815fb']
Fix androidTest on real device #5970 requires that AnkiDroidApp.onCreate is run on the UI thread. Application.onCreate is guaranteed to be run on the UI thread, so this fixes tests to do this. https://stackoverflow.com/a/30390340
[{'old_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/ACRATest.java', 'new_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/ACRATest.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -4,6 +4,7 @@ import android.Manifest;\n import android.app.Instrumentation;\n import android.content.Share...
Kotlin
8782189996b8c07e0e42e68d41d9b6f88ac2bbcc
45
2020-04-12 11:19:29-05:00
-7,200
['8060018cb832915f4b900f0bb62d4853ff741d8f']
Undo and Dismiss block controls too
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1187,6 +1187,7 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity {\n ...
Kotlin
89541567d1ffb413549cde7c327b101f3d4f9f63
45
2020-04-12 11:19:29-05:00
-7,200
['8782189996b8c07e0e42e68d41d9b6f88ac2bbcc']
Knowing whether controls are currently blocked
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -360,6 +360,9 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity {\n ...
Kotlin
ee5588305c0f4405e8ac830422931097ad79406a
45
2020-04-12 11:19:29-05:00
-7,200
['89541567d1ffb413549cde7c327b101f3d4f9f63']
don't bury/suspend note when blocked This commit may seems useles. But it allows to avoid accessing the database and save time
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -759,7 +759,7 @@ public class Reviewer extends AbstractFlashcardViewer {\n * @return true if there is another card of same note...
Kotlin
05806f7c89f3633c7616a6f37a5c45fff70198cd
45
2020-04-12 11:19:29-05:00
-7,200
['ee5588305c0f4405e8ac830422931097ad79406a']
Blocking/unblocking change top menu buttons too
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -2423,6 +2423,7 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity {\n ...
Kotlin
7c9911b650333f5ebd5d38ec3d89d2b205bc3317
45
2020-04-12 11:19:29-05:00
-7,200
['05806f7c89f3633c7616a6f37a5c45fff70198cd']
top menu items are deactivated when buttons are blocked
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -367,7 +367,20 @@ public class Reviewer extends AbstractFlashcardViewer {\n private void setCustomButtons(Menu menu) {\n ...
Kotlin
029afff75fbcf85fa0e324fdca925d3212c34ce2
45
2020-04-12 11:19:29-05:00
-7,200
['7c9911b650333f5ebd5d38ec3d89d2b205bc3317']
don't put "undo" to color enabled Enabled is the default, so it's useless and actually put back the color uselessly
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -423,14 +423,12 @@ public class Reviewer extends AbstractFlashcardViewer {\n if (mShowWhiteboard && mWhiteboard != null && m...
Kotlin
6d979ceb05789e56496037f2932ce445c4d21d21
3
2020-04-12 13:06:46-05:00
14,400
['029afff75fbcf85fa0e324fdca925d3212c34ce2']
Enable toggle sticky feature on fields in field editor * Create the button in the model editor context menu * Create the backend function toggleStickyField() * Remove JSONException handling boilerplate Co-authored-by: Mike Hardy <github@mikehardy.net>
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/ModelFieldEditor.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/ModelFieldEditor.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -421,6 +421,20 @@ public class ModelFieldEditor extends AnkiActivity {\n }\n }\n \n+ /*\n+ * Togg...
Kotlin
5fbc66d581308187c4a727ad0293a75c1096c550
45
2020-04-12 13:07:40-05:00
-7,200
['6d979ceb05789e56496037f2932ce445c4d21d21']
Uses classes to sort deck names and deck objects There were a lot of duplicate and almost duplicate code in AnkiDroid. Often the comparator class was put in some random place, where it could not easily be found to be used again when needed. So I tried to make this slightly more consistent by creating three comparators...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckOptions.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckOptions.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -55,6 +55,7 @@ import com.ichi2.ui.AppCompatPreferenceActivity;\n import com.ichi2.utils.JSONArray;\n import com.ichi2.utils.J...
Kotlin
62f5a1374f2d4b951f689019201b6bcf8beaa094
45
2020-04-12 14:08:22-05:00
-7,200
['5fbc66d581308187c4a727ad0293a75c1096c550']
Deactivate gesture when controls are blocked
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -2499,6 +2499,9 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity {\n ...
Kotlin
350bd381ba3151061c3488293e1a7307820cca96
45
2020-04-12 14:08:38-05:00
-7,200
['62f5a1374f2d4b951f689019201b6bcf8beaa094']
dismiss note available splitted for bury/suspend
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -463,14 +463,14 @@ public class Reviewer extends AbstractFlashcardViewer {\n // Setup bury / suspend providers\n Men...
Kotlin
77de7abe29941b8b368269b255394e275b66b9e7
45
2020-04-12 14:08:38-05:00
-7,200
['350bd381ba3151061c3488293e1a7307820cca96']
Replace suspend/bury note available by a single sql query
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -770,33 +770,22 @@ public class Reviewer extends AbstractFlashcardViewer {\n * @return true if there is another card of same no...
Kotlin
20f7016d8bda8c60fa88112b0662946131b5e5de
45
2020-04-12 15:00:01-05:00
-7,200
['77de7abe29941b8b368269b255394e275b66b9e7']
Decks._path to path As in upstream anki
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -494,7 +494,7 @@ public class Decks {\n String ontoDeckName = get(ontoDeckDid).getString("name");\n \n if (ontoDeckD...
Kotlin
576f44b6ac78c1c750ef17fa40d8a6eadaa68273
45
2020-04-12 15:00:01-05:00
-7,200
['6b000b86d0943257848e8faff7858de8743bcb44']
basename public as in upstream
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -495,13 +495,13 @@ public class Decks {\n \n if (ontoDeckDid == null) {\n if (path(draggedDeckName).size() > 1) ...
Kotlin
1b96a1ce2ae7312afcdb5994742702f81b85b3a1
45
2020-04-12 15:00:01-05:00
-7,200
['6c9379ed51a1734721b4f5da7d9e491aedbcc2d2']
correct _isParent similarly to upstream
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -517,9 +517,14 @@ public class Decks {\n \n private boolean _isParent(String parentDeckName, String childDeckName) {\n L...
Kotlin
be6d9c231358674e3ec87fc4638cb385a2d62d12
45
2020-04-12 15:00:01-05:00
-7,200
['1b96a1ce2ae7312afcdb5994742702f81b85b3a1']
Correct _isAncestor As in upstream
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -536,8 +536,13 @@ public class Decks {\n \n \n private boolean _isAncestor(String ancestorDeckName, String descendantDeckName) {...
Kotlin
205591a3fd1a393ba7978ce66b1a0143b6e9db50
45
2020-04-12 15:00:01-05:00
-7,200
['be6d9c231358674e3ec87fc4638cb385a2d62d12']
Don't add to parentDeckName This was useless
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -518,9 +518,8 @@ public class Decks {\n private boolean _isParent(String parentDeckName, String childDeckName) {\n List<...
Kotlin
481fe1ee90c5aaade79e636d79ccec93cf12037b
45
2020-04-12 15:00:01-05:00
-7,200
['205591a3fd1a393ba7978ce66b1a0143b6e9db50']
_ensureParents without sublist Uselessly slow for what it's worth here
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -570,7 +570,8 @@ public class Decks {\n if (path.size() < 2) {\n return name;\n }\n- for(String p...
Kotlin
36e385520c1b23c157b2d0a4e03b6f6146b45049
45
2020-04-12 16:01:14-05:00
-7,200
['be6d3d9aa807ccaeb42b020810cad4f8b52b5f45']
Rename DeckTask to CollectionTask This class was created in 2009. If I understand code history correctly "Deck" has been renamed to "Collection" and what is called "deck" today is totally distinct. This commit was done using android studio, so I am quite confident it did not miss anything. And I hope it'll make the c...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -85,7 +85,7 @@ import com.ichi2.anim.ActivityTransitionAnimation;\n import com.ichi2.anim.ViewAnimatio...
Kotlin
1a1a041e9d18326233c24f3a1017cf58b7c42bac
80
2020-04-12 16:11:28-05:00
18,000
['36e385520c1b23c157b2d0a4e03b6f6146b45049']
Bumped version to 2.10alpha68 @branch-specific
[{'old_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'new_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -22,8 +22,8 @@\n xmlns:tools="http://schemas.android.com/tools"\n package="com.ichi2.anki"\n android:installLocation="auto"\n- ...
Kotlin
010da1022e6a52a22a5008c05fe5c5736100b5c3
45
2020-04-13 08:23:45-05:00
-7,200
['27dbe08ede1c0de628ff65123f4650d94fe1fe29']
CollectionTask in comments and Timber
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/CardBrowser.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/CardBrowser.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1113,7 +1113,7 @@ public class CardBrowser extends NavigationDrawerActivity implements\n }\n \n \n- // We spawn DeckTa...
Kotlin
5bc6b0a5ed40c2f2d2917477347804001ac56512
45
2020-04-13 10:27:39-05:00
-7,200
['1c0b21cbfb0b826c88eae670687d19d57af371ef']
Don't reset in deck picker when cards are present resetting the scheduler does not change the content of the due tree. So resetting is useles when the due tree suffice to take a decision. I thus moved resetting after that. I had to keep .counts() after resetting in orde to take correct value. And also to remove the i...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1980,12 +1980,10 @@ public class DeckPicker extends NavigationDrawerActivity implements\n // Also forget the last deck ...
Kotlin
a57f7d3fbfa147367cb44f2f68b898d3b1ba30df
45
2020-04-13 10:27:39-05:00
-7,200
['5bc6b0a5ed40c2f2d2917477347804001ac56512']
Put comments from SchedV2 to AbstractSched
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/AbstractSched.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sched/AbstractSched.java', 'type': <ModificationType.MODIFY: 5>, 'diff': "@@ -14,26 +14,41 @@ import java.util.List;\n import java.util.Locale;\n \n public abstract class AbstractSc...
Kotlin
5311bec88862c1c48ff7d601e04a98e9a3715253
45
2020-04-13 10:27:39-05:00
-7,200
['a57f7d3fbfa147367cb44f2f68b898d3b1ba30df']
deck due tree is cancellable Deck due tree takes ~5 seconds to compute on my phone. It uses the database a lot and thus block other process who want to access it. This is the case in particular if I go back to the deck picker and select a new deck quickly, in which case the new tree is not already computed. This ens...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/async/CollectionTask.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/async/CollectionTask.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -533,7 +533,7 @@ public class CollectionTask extends BaseAsyncTask<CollectionTask.TaskData, Colle\n Collection...
Kotlin
e4bcaa87be1e28e2e2b63f0006a44b333288946e
45
2020-04-13 10:27:39-05:00
-7,200
['5311bec88862c1c48ff7d601e04a98e9a3715253']
Create a list of task to cancel when deck picker is closed In particular, it allows to ensure that the deck due tree, which become useles when the deck picker is close, stop being computed and thus blocking database access
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -185,6 +185,8 @@ public class DeckPicker extends NavigationDrawerActivity implements\n \n private List<Sched.DeckDueTreeNode...
Kotlin
21bc3409b0907a1e880271be1721a8e5f9a8f1c4
30
2020-04-13 11:19:20-05:00
-3,600
['1e372bf7926f1034dff16664919edb610eab5ab3']
NF: Extract updateMultimediaNoteFromFields()
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/servicelayer/NoteService.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/servicelayer/NoteService.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -71,10 +71,14 @@ public class NoteService {\n \n public static void updateMultimediaNoteFromJson...
Kotlin
09b4b0393c2f0387d022f763e641eb4fe96905f0
30
2020-04-13 11:19:20-05:00
-3,600
['21bc3409b0907a1e880271be1721a8e5f9a8f1c4']
NF: Extract startMultimediaFieldEditorForField()
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/NoteEditor.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/NoteEditor.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1119,8 +1119,8 @@ public class NoteEditor extends AnkiActivity {\n private void setMMButtonListener(ImageButton mediaButton...
Kotlin
8694609e44a11ac378d6359498e55b3fbeb9b1b8
30
2020-04-13 11:19:20-05:00
-3,600
['5fa93bc19838f788305d6c5277df186aa5915e3b']
NF: Extract: getFieldsAsBundle
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/NoteEditor.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/NoteEditor.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -323,19 +323,26 @@ public class NoteEditor extends AnkiActivity {\n mSelectedTags = new ArrayList<>();\n }\n...
Kotlin
595fb0bb4e0d8b8a114dba7a1af594e92b4a4079
30
2020-04-13 11:19:20-05:00
-3,600
['1a2d1059969cb860dea8d802c89e5e810678ace1']
Multimedia Editor - Use Current Field Values Fixes #5992 Previously, we were using the field values from the existing model in the database when editing fields. Now, we use the values shown in the UI.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': "@@ -3218,4 +3218,11 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity {\n...
Kotlin
2e45e3125f047d1a3680089338d75f7c2371dbe9
30
2020-04-13 13:38:25-05:00
-3,600
['595fb0bb4e0d8b8a114dba7a1af594e92b4a4079']
Extract BrowserAppearance and delete abstractions Mostly for use in the Visual Editor Delete ReviewerExtRegistry and implementations - only contained one class
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -83,8 +83,9 @@ import com.afollestad.materialdialogs.MaterialDialog;\n import com.afollestad.materiald...
Kotlin
578b2a4c524b313ed3147d7bcfdc5afefc1c7bf4
30
2020-04-13 13:38:25-05:00
-3,600
['2e45e3125f047d1a3680089338d75f7c2371dbe9']
REVIEW: Deprecate convertSmpToHtmlEntity This code existed before auto-updating WebViews, and appears unnecessary. We gate the feature to < API 21 to determine if it's still required.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/CardAppearance.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/CardAppearance.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1,6 +1,7 @@\n package com.ichi2.anki.cardviewer;\n \n import android.content.SharedPreferences;\n...
Kotlin
cd68e343becb024a35ad64980866b6e6e78b15ef
30
2020-04-13 13:52:03-05:00
-3,600
['578b2a4c524b313ed3147d7bcfdc5afefc1c7bf4']
TEST: Speed up typeAnsAnswerFilter calls
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -734,7 +734,8 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity {\n ...
Kotlin
cb49fb552ef82bfeef7da7d2dd1b14b5c1306489
80
2020-04-13 14:48:58-05:00
18,000
['cd68e343becb024a35ad64980866b6e6e78b15ef']
Upgrade to robolectric 4.3.1 with new Looper mode This involved handling some timer differences, and accessing Context differently The only troubling part was in AbstractFlashcardViewerTest - there's a thorny timing issue there which I solved by coarsely hacking in a sleep
[{'old_path': 'AnkiDroid/build.gradle', 'new_path': 'AnkiDroid/build.gradle', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -160,7 +160,7 @@ dependencies {\n testImplementation \'org.powermock:powermock-api-mockito2:2.0.7\'\n testImplementation \'org.hamcrest:hamcrest-all:1.3\'\n testImplementation \'ne...
Kotlin
4740941a4e5885f21b331748199d47fd5ca61204
45
2020-04-13 14:53:19-05:00
-7,200
['cb49fb552ef82bfeef7da7d2dd1b14b5c1306489']
equalsIgnoreCase constant string before variable The same idea than a previous commit which put constant before equals instead of after
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -2832,7 +2832,7 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity {\n ...
Kotlin
bb7386019f2a279a82d682d7cc843579ff469d5a
45
2020-04-13 17:50:03-05:00
-7,200
['4740941a4e5885f21b331748199d47fd5ca61204']
Replace "deck" by "collection"
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Decks.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -859,7 +859,7 @@ public class Decks {\n ja.put(n);\n }\n mCol.getConf().put("activeDecks", ja);\n- ...
Kotlin
207d6c9a1a78d7b1a02593046e1a9a7b14ed366a
45
2020-04-13 17:50:03-05:00
-7,200
['bb7386019f2a279a82d682d7cc843579ff469d5a']
Selecting a deck modifies collectino, not deck When a deck is selected, the selected deck must be added in the Collection configuration. However, there is no reason for the decks to be saved; nothing in them have changed. Thus select change mMod of collection, not of decks.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/DB.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/DB.java', 'type': <ModificationType.MODIFY: 5>, 'diff': "@@ -54,7 +54,7 @@ public class DB {\n private static SupportSQLiteOpenHelper.Factory sqliteOpenHelperFactory = null;\n \n /**\n- ...
Kotlin
734cd8123b5e9afe99950d1681e7c4e95e40efbd
45
2020-04-13 17:52:14-05:00
-7,200
['207d6c9a1a78d7b1a02593046e1a9a7b14ed366a']
Correct bury/suspend note It seems I did two mistakes. getControlBlocked did disappear from one condition. Probably due to a rebasing during a conflict of PR. "count() ... limit 1" does not limit counting to one element, but the number of count result to 1. Which is not what I intended. This version ensure that I i...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -774,16 +774,16 @@ public class Reviewer extends AbstractFlashcardViewer {\n return false;\n }\n // whet...
Kotlin
f7786bc95020aa0b3491d5be621ea53e4f582812
45
2020-04-13 19:20:37-05:00
-7,200
['734cd8123b5e9afe99950d1681e7c4e95e40efbd']
Removing the method lock which was useless Unless I don't understand anything about SQL, the query ```sql UPDATE col SET mod=mod ``` is entirely useless. Intuitively, I would assume that the idea was to do ```sql UDPATE col set mod=? ``` with value `mod`. Except that here, the java variable is a boolean while the s...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Collection.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Collection.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -352,7 +352,6 @@ public class Collection {\n if (mDb.getMod()) {\n flush(mod);\n mDb.commi...
Kotlin
6036dea2f8540aa912c7051472ea090580252a88
45
2020-04-13 20:13:58-05:00
-7,200
['f7786bc95020aa0b3491d5be621ea53e4f582812']
uses Decks.path I didn't find them in previous PR because I was only searching for `split("::")`.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Statistics.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Statistics.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -450,7 +450,7 @@ public class Statistics extends NavigationDrawerActivity implements DeckDropDown\n mDeckId = ((Stat...
Kotlin
ab8f492e079ed6f01c6ab6aac8cbfb2030bb51d1
80
2020-04-13 22:48:58-05:00
18,000
['988e0ba1c55ab3d89aca57152c5c8ddb9c3cf775']
Bumped version to 2.10alpha69 @branch-specific
[{'old_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'new_path': 'AnkiDroid/src/main/AndroidManifest.xml', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -22,8 +22,8 @@\n xmlns:tools="http://schemas.android.com/tools"\n package="com.ichi2.anki"\n android:installLocation="auto"\n- ...
Kotlin
3f8c2bca3c5d57c76552c2e3987964199927c3ff
30
2020-04-14 22:20:29-05:00
-3,600
['ab8f492e079ed6f01c6ab6aac8cbfb2030bb51d1']
NF: Add closeable warning The Response is the AutoCloseable part of OKHttp. Ensure that clients know it's to be closed
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -112,27 +112,27 @@ public class HttpSyncer {\n }\n }\n \n-\n+ /** Note: Return value must be clos...
Kotlin
cf885b1b933e693bcd3a63691a09d53ed62169b0
30
2020-04-14 22:20:29-05:00
-3,600
['3f8c2bca3c5d57c76552c2e3987964199927c3ff']
Reuse connections on Sync This defines a per-syncer HttpClient which will manage the connection In tests (listed in #4568), I only had 3 connection requests overall, rather than hundreds when syncing media.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -90,6 +90,7 @@ public class HttpSyncer {\n protected String mSKey;\n protected Connection mCon;\n pr...
Kotlin
4a7b34868d1e017a29a5e183c3e4c36181d5130e
45
2020-04-14 22:22:30-05:00
-7,200
['cf885b1b933e693bcd3a63691a09d53ed62169b0']
remove renderQA Those are not in upstream and are not called anywhere
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Collection.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Collection.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -1009,32 +1009,6 @@ public class Collection {\n * Q/A generation ****************************************************...
Kotlin
03a67723f8d7721132a4def035b47d9af642e3e1
30
2020-04-15 13:17:18-05:00
-3,600
['4a7b34868d1e017a29a5e183c3e4c36181d5130e']
Fix Import errors in ImportUtils This was originally intended to be a lint fix, but raised that we use intent.getData() rather than obtaining the provided data URI. This will both make the lint check in the file green, and should fix some import issues.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/utils/ImportUtils.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/utils/ImportUtils.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -90,6 +90,8 @@ public class ImportUtils {\n \n \n private static String handleContentProviderFile(Context context, Inten...
Kotlin
70fe673f2ddd9de5de194404dd1419e3b8be53f7
45
2020-04-15 16:11:19-05:00
-7,200
['e3bdd2ce483994a042560731326fcc6e3da4bfc4']
fact to note in comment
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/NoteEditor.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/NoteEditor.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -100,9 +100,9 @@ import java.util.Map.Entry;\n import timber.log.Timber;\n \n /**\n- * Allows the user to edit a fact, for insta...
Kotlin
9385512f345e6b1d9e2bf3ee94d11c23d4a95d22
45
2020-04-15 17:51:36-05:00
-7,200
['939b6f1fd5ffb928402a049f6c7cf34cb2777b1a']
Remove full reset in syncer The only ponit of this reset was to compute the count. Given that the count is done again in recalculateCounts, this became useless
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/Syncer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/Syncer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -378,7 +378,6 @@ public class Syncer {\n if (found) {\n mCol.getModels().save();\n ...
Kotlin
878c1be77b546ccc41f349bc910c264ea0635477
45
2020-04-15 18:27:24-05:00
-7,200
['9385512f345e6b1d9e2bf3ee94d11c23d4a95d22']
Allow listener to be null in collection task This will allow to avoid forcing the use of an actual listener when no action are required before/after
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/async/CollectionTask.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/async/CollectionTask.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -135,6 +135,10 @@ public class CollectionTask extends BaseAsyncTask<CollectionTask.TaskData, Colle\n * @param par...
Kotlin
8f45cccb523279561a299e008c50e67ca1f0d69c
30
2020-04-15 18:28:07-05:00
-3,600
['a6f6ea2c702ab75c3899111fd6b6967860110a0b']
Allow optional disable of jacocoDebug Task often hung on machine inside Android Studio. There was no need for it if I was just deploying to my Android.
[{'old_path': 'AnkiDroid/build.gradle', 'new_path': 'AnkiDroid/build.gradle', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -48,8 +48,18 @@ android {\n debuggable true\n // Check Crash Reports page on developer wiki for info on ACRA testing\n buildConfigField "String", "ACRA_URL"...
Kotlin
591584e3dba853e1f432af05ed6f65ace07cecb4
30
2020-04-15 21:14:32-05:00
-3,600
['8f45cccb523279561a299e008c50e67ca1f0d69c']
Add hostNum from preferences if set Unused, but handle the threading of the variable into the sync code
[{'old_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/libanki/HttpTest.java', 'new_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/libanki/HttpTest.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -35,7 +35,7 @@ public class HttpTest {\n \n String username = "AnkiDroidInstrument...
Kotlin
f181b773980301a4126abca5281b1982d62ba96b
30
2020-04-15 21:14:32-05:00
-3,600
['591584e3dba853e1f432af05ed6f65ace07cecb4']
Add unit tests for current code And ignored tests for hostNum changes
[{'old_path': None, 'new_path': 'AnkiDroid/src/test/java/com/ichi2/libanki/sync/HttpSyncerTest.java', 'type': <ModificationType.ADD: 1>, 'diff': '@@ -0,0 +1,99 @@\n+package com.ichi2.libanki.sync;\n+\n+import android.content.SharedPreferences;\n+\n+import com.ichi2.anki.AnkiDroidApp;\n+\n+import org.junit.Ignore;\n+imp...
Kotlin
1bad8c1983535053aa214490229ca707a75e18be
30
2020-04-15 21:14:32-05:00
-3,600
['f181b773980301a4126abca5281b1982d62ba96b']
NF: Extract getUrlPrefix() Anki removed SYNC_MEDIA_BASE, we work towards this
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -457,12 +457,15 @@ public class HttpSyncer {\n SharedPreferences userPreferences = AnkiDroidApp.getShare...
Kotlin
fbac42381568b3444596ad1fa087c14e89eb2b78
30
2020-04-15 21:14:32-05:00
-3,600
['1bad8c1983535053aa214490229ca707a75e18be']
NF: Extract isUsingCustomSyncServer() Refactoring for code clarity
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -56,6 +56,7 @@ import java.util.zip.GZIPOutputStream;\n \n import javax.net.ssl.SSLException;\n \n+import androi...
Kotlin
73a15057c4c1b0fd0a8abdb942bf0b1be66fd775
30
2020-04-15 21:14:32-05:00
-3,600
['fbac42381568b3444596ad1fa087c14e89eb2b78']
Add more tests before changes Regarding the value if one preference is found and the other fails.
[{'old_path': 'AnkiDroid/src/test/java/com/ichi2/libanki/sync/HttpSyncerTest.java', 'new_path': 'AnkiDroid/src/test/java/com/ichi2/libanki/sync/HttpSyncerTest.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -18,6 +18,9 @@ import static org.hamcrest.Matchers.is;\n public class HttpSyncerTest {\n private sta...
Kotlin
737f4405de6ad7e686ab10c7031bcc11979d3f36
30
2020-04-15 21:14:32-05:00
-3,600
['73a15057c4c1b0fd0a8abdb942bf0b1be66fd775']
NF: Extract getDefaultAnkiWebUrl()
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -475,6 +475,10 @@ public class HttpSyncer {\n protected boolean isUsingCustomSyncServer(@Nullable SharedPref...
Kotlin
c2ece47e33d9252f35586aba54ac721ca811a10f
30
2020-04-15 21:14:32-05:00
-3,600
['737f4405de6ad7e686ab10c7031bcc11979d3f36']
Remove SYNC_MEDIA_BASE and fix bug
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Consts.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Consts.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -80,7 +80,6 @@ public class Consts {\n public static final int SYNC_ZIP_SIZE = (int)(2.5*1024*1024);\n public static final...
Kotlin
465d20b9e757367f30a64b3505677d9d91bdda65
30
2020-04-15 21:14:32-05:00
-3,600
['fd1f6499c898e7f70179c982e2f6c3d0db9b3b00']
Use HostNum for Load Balancing We don't set the variable yet, but we move to a point where we can set it and it will be handled correctly.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Consts.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Consts.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -79,7 +79,8 @@ public class Consts {\n public static final int SCHEMA_VERSION = 11;\n public static final int SYNC_ZIP_SIZ...
Kotlin
72cbde35319a2a84ac5115427a0242586d9ef9cf
30
2020-04-15 21:14:32-05:00
-3,600
['465d20b9e757367f30a64b3505677d9d91bdda65']
Read HostNum from AnkiWeb into Preferences and use Fixes #4921 Brings the HostNum class into the inheritance hierarchy to allow it to be modified while the sync process is ongoing. Also provides the reference to Syncer to allow it to persist the data when loaded from /meta/.
[{'old_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/libanki/HttpTest.java', 'new_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/libanki/HttpTest.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -5,6 +5,7 @@ import android.os.Build;\n \n import com.ichi2.async.Connection;\n import com...
Kotlin
fb0016a1de8613c491cadbbfaf778c89027c194a
30
2020-04-15 21:14:32-05:00
-3,600
['72cbde35319a2a84ac5115427a0242586d9ef9cf']
Remove LEGACY_SYNC_BASE Confirmed with Damien that methods were unused: > Those two endpoints look like they could be removed. > Upgrade was an old endpoint that upgraded Anki 1.x collections, > and users need to sign up for an account in a webview these days. https://github.com/ankidroid/Anki-Android/issues/4921 #i...
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Consts.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/Consts.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -79,7 +79,6 @@ public class Consts {\n public static final int SCHEMA_VERSION = 11;\n public static final int SYNC_ZIP_SIZ...
Kotlin
7af95103229f5f3f493b14450600a6192e0a547c
30
2020-04-15 21:14:32-05:00
-3,600
['fb0016a1de8613c491cadbbfaf778c89027c194a']
NF: Extract prefs to CustomSyncServer
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Preferences.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/Preferences.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -51,6 +51,7 @@ import com.ichi2.anki.exception.ConfirmModSchemaException;\n import com.ichi2.anki.exception.StorageAccessExcep...
Kotlin
6ce5c5946b3fc11fc8e4ff7f3a3b4647c17f1c9d
30
2020-04-15 21:14:32-05:00
-3,600
['7af95103229f5f3f493b14450600a6192e0a547c']
Remove HostNum on logoff or sync server change The hostnum is only valid for the account, on these changes, the preference is no longer valid and should be unset.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/MyAccount.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/MyAccount.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -128,6 +128,7 @@ public class MyAccount extends AnkiActivity {\n Editor editor = preferences.edit();\n editor.putS...
Kotlin
836caac8f963387066ce3651600677af3a7422de
30
2020-04-15 21:14:32-05:00
-3,600
['6ce5c5946b3fc11fc8e4ff7f3a3b4647c17f1c9d']
Convert HostNum to Integer Review Discussion - AnkiWeb guarantees that the HostNum is an integer and allowing a string means we can get URL injection.
[{'old_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/libanki/HttpTest.java', 'new_path': 'AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/libanki/HttpTest.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -36,7 +36,7 @@ public class HttpTest {\n \n String username = "AnkiDroidInstrument...
Kotlin
8bc3ed23322be240ea88ef7bca97493663315987
30
2020-04-15 21:14:32-05:00
-3,600
['836caac8f963387066ce3651600677af3a7422de']
NF: HostNum - Reduce coupling to Preferences Via factory class Ensures that we keep code modifications to the hostNum consistent.
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -93,7 +93,7 @@ import com.ichi2.anki.exception.ConfirmModSchemaException;\n import com.ichi2.anki.exception.DeckRenameException;...
Kotlin
735984b72aedf2be386b5c39190ec6846fd4149a
30
2020-04-15 21:14:32-05:00
-3,600
['8bc3ed23322be240ea88ef7bca97493663315987']
NF: Preferences - commit -> apply
[{'old_path': 'AnkiDroid/src/test/java/com/ichi2/libanki/sync/HttpSyncerTest.java', 'new_path': 'AnkiDroid/src/test/java/com/ichi2/libanki/sync/HttpSyncerTest.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -107,7 +107,7 @@ public class HttpSyncerTest {\n \n private void setCustomServerWithNoUrl() {\n ...
Kotlin
7e729fef1b25b7decfb92f50e8b6e612f9359168
30
2020-04-15 21:14:32-05:00
-3,600
['735984b72aedf2be386b5c39190ec6846fd4149a']
NF: HostNum: Added requirements
[{'old_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HostNum.java', 'new_path': 'AnkiDroid/src/main/java/com/ichi2/libanki/sync/HostNum.java', 'type': <ModificationType.MODIFY: 5>, 'diff': '@@ -7,6 +7,16 @@ import com.ichi2.libanki.Consts;\n * should use that hostNum to construct the sync URL, until a future ...
Kotlin