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

12806 Commits

Author SHA1 Message Date
Arthur Milchior
3773d62822
NF: new_to_legacy:
Util method to transform a template into a legacy template, for test purposes

(cherry picked from commit e9648b2525)
2021-06-01 09:07:12 -05:00
Arthur Milchior
89f091673c
NF: rename handlebar_token to new_handlebar_token
(cherry picked from commit d4d9fb39c2)
2021-06-01 09:07:11 -05:00
Arthur Milchior
4da8c4c8f3
NF: generalize handlebar_token
(cherry picked from commit 901a42b2ec)
2021-06-01 09:07:11 -05:00
David Allison
34ff68f739
fix[Lookup Icon]: increase size
In conversion to SVG, the icon had dimensions changed

On my Android, it came in at 160px, which was roughly 60dp

Fixes 8997
2021-05-31 09:02:25 -05:00
David Allison
a8b4a7297c
fix[Notification Icon]: increase size
In conversion to SVG, the icon had whitespace increased

Reduce it back to what it was

Related: 8997
(cherry picked from commit 5defe65b6b)
2021-05-31 09:02:05 -05:00
David Allison
e0d8abee3d
fix[Audio Import]: mpeg converted to mp3
Cause: we converted "a.mp3" to "a_mp3"
which failed the file type conversion

Fixes 9008
Alleviates 9023

(cherry picked from commit fd8fac37e7)
2021-05-30 21:51:18 -05:00
Arthur Milchior
72b414c40b
NF: factorize test_emptyness
(cherry picked from commit a18acbd303)
2021-05-30 16:51:34 -05:00
Arthur Milchior
8f68a11f01
NF: factorize test_parsing
(cherry picked from commit 1f76675b69)
2021-05-30 16:51:33 -05:00
Arthur Milchior
416daf49b2
NF: Factorize test_render
(cherry picked from commit 945cd40a2e)
2021-05-30 16:51:33 -05:00
Arthur Milchior
bcbe95a3ec
NF: factorize next_token test
(cherry picked from commit 942386bb30)
2021-05-30 16:51:32 -05:00
Arthur Milchior
2ba2168d54
NF: factorize handlebar_token
(cherry picked from commit 36f033eb68)
2021-05-30 16:51:32 -05:00
Arthur Milchior
275fabbc72
NF: factorize classify_handle test
(cherry picked from commit 125f8003b7)
2021-05-30 16:51:32 -05:00
Arthur Milchior
e944151f7b
NF: factorize text_token
(cherry picked from commit c1b7263a76)
2021-05-30 16:51:31 -05:00
Arthur Milchior
27dadb321b
NF: replace Mathers.is by is
(cherry picked from commit e7ec26846c)
2021-05-30 16:51:31 -05:00
Arthur Milchior
76acd600ea
NF: ensure qualifiers is en for missingExclamation
(cherry picked from commit 114cba5a1e)
2021-05-30 16:46:36 -05:00
Arthur Milchior
787a72d8f0
NF: correctly initialize mFailed
(cherry picked from commit e7ca2905c8)
2021-05-30 16:46:35 -05:00
Peyman-hme
d8058c1f11
add a space to a line of code
(cherry picked from commit 606a5d6ef1)
2021-05-30 09:41:24 -05:00
Peyman-hme
fb509ba945
Fix show floating point numbers for steps in DeckOptions
(cherry picked from commit eea660d236)
2021-05-30 09:41:23 -05:00
AnkiDroid Translations
d230f3dd51
Updated strings from Crowdin
(cherry picked from commit c33648a0d3)
2021-05-30 09:41:23 -05:00
David Allison
158295aa8d
language: Add Kannada
This requires a translation sync to test

Fixes 8979

(cherry picked from commit 9287caecb1)
2021-05-30 09:41:23 -05:00
AnkiDroid Translations
f97b78d61e
Updated strings from Crowdin
(cherry picked from commit 1772369912)
2021-05-30 09:41:22 -05:00
Mike Hardy
964ec9b401
build: remove remnant dirs from r8 failure workaround
Fixes #8982 maybe

(cherry picked from commit db31220406)
2021-05-28 12:14:41 -05:00
David Allison
52e42c5281
test: test_field_named_frontSide
Requested in a review - ensures behaviour matches Anki Desktop

(cherry picked from commit cf53ad406d)
2021-05-28 12:12:00 -05:00
David Allison
a34e674bae
fix: "{{FrontSide}}" should be blank on front
People use this - Anki has it special cased unintentionally due to
hooks, but this is in use in AnkiDroid

It wasn't working before this, but the template
{{Front}}{{FrontSide}} previously rendered
as helloworld{Unknown field FrontSide} in 2.14.6

Anki: 400254277b/rslib/src/template.rs (L409-L417)

Our change: 08217da (issue 7980)

Fixes 8951

(cherry picked from commit 2391712061)
2021-05-28 12:12:00 -05:00
David Allison
d65606e7a1
lint: fix imports
(cherry picked from commit c175e22eba)
2021-05-28 12:12:00 -05:00
Shridhar Goel
4b0224baea
Update AnkiDroid/src/main/java/com/ichi2/anki/Info.java
Co-authored-by: David Allison <62114487+david-allison-1@users.noreply.github.com>
(cherry picked from commit a95c683050)
2021-05-28 12:07:57 -05:00
Shridhar
9dd8c886ad
Remove extra line
(cherry picked from commit 51409f77c1)
2021-05-28 12:07:57 -05:00
Shridhar
30c0b5c7fb
Follow proper backstack movement in changelog section
(cherry picked from commit dfcbfab08b)
2021-05-28 12:07:54 -05:00
David Allison
d1dcad9483
fix[stats] start at "Overview" tab in RTL mode
This is disappointing: there is a bug in TaLayout which means that
selecting index[0] before the control has been laid out will position
the control at LEFT, rather than START (effective result,
not actual code)

Fix this by detecting the layout event for the control, and then
selecting the tab: this uses a scroll animation, which works

Fixes 8984

(cherry picked from commit 447da4275b)
2021-05-27 21:22:45 -05:00
Mike Hardy
f128f53c0a
Bumped version to 2.15.2
@branch-specific
2021-05-26 19:31:14 -05:00
David Allison
8addd11a69
fix[api]: duplicate checks
We moved to our own backend cursor which did not implement
moveToPostion, or getType(int). I did not believe this cursor was
provided to consumers, but it was provided via our ContentProvider
API

A new backend version implements those methods

DatabaseUtils.cursorFillWindow is used by a real usage of the API
but our tests did not use it

We copy it into the project as the methods are marked with `hide`

And ensure the invariants are handled

Fixes 8957

(cherry picked from commit d9d30108b8)
2021-05-26 19:25:08 -05:00
Mike Hardy
e56823cfc5
test(templates): exercise space-stripping on token parse
(cherry picked from commit bbff271245)
2021-05-26 15:34:26 -05:00
Mike Hardy
f3defaea7d
fix(template tokenizer): strip spaces between token start and token
Fixes #8944 - tokens were not matching because spacing was taken verbatim

(cherry picked from commit 3362d2e8d1)
2021-05-26 15:34:22 -05:00
AlexApps99
d004c3094b
Update AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java
Co-authored-by: Mike Hardy <github@mikehardy.net>
(cherry picked from commit f4dd4958d9)
2021-05-26 10:15:23 -05:00
AlexApps99
42cbc51ee9
Update AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java
Co-authored-by: Mike Hardy <github@mikehardy.net>
(cherry picked from commit 2c6a875d0f)
2021-05-26 10:15:23 -05:00
AlexApps99
0a5530f4ac
Fix timing for Automatic Display Answer
Prevents Automatic Display Answer from happening instantly when the delay is set to 0, but there is audio present

(cherry picked from commit 672a654e21)
2021-05-26 10:15:23 -05:00
doggooo
be7fea1800
Set deck to default if selected id doesn't exist 2021-05-26 10:12:54 -05:00
Mike Hardy
0aaf7b01b2
fix(amazon): assemble amazon release w/universal APK, publish correct path
It works!

(cherry picked from commit 2bcfd2f199)
2021-05-25 18:20:45 -05:00
Mike Hardy
c90349f759
Bumped version to 2.15.1
@branch-specific
2021-05-25 16:51:26 -05:00
David Allison
2825c4c47c
fix ContentProvider/API related crashes
Fixed by upgrading the backend

some of the methods on the Cursor for the database
were called internally by Android

These were throwing NotImplementedException

Changed in the backend code to log a warning:
they shouldn't be required as we don't support .requery()

Fixes 8931
Fixes 8928 (hopefully)

(cherry picked from commit a47b3acb2a)
2021-05-25 16:34:31 -05:00
Mike Hardy
0b599c70f2
test(models): restore unit test for req array
(cherry picked from commit 5cd52d7539)
2021-05-25 16:27:47 -05:00
Mike Hardy
9ac997ff15
fix(model): generate req field for old client compatibility
req is unused in current clients but that is new enough we'll keep it for
compatibility for now

Fixes #8945

(cherry picked from commit ca2aab0f8e)
2021-05-25 16:27:46 -05:00
David Allison
f49cf9a1d4
pref: only load MathJax if MathJax exists
User reported that 2.15 was significantly slower, this seems to be due
to MathJax 3.

User's cards did not contain MathJax

So, we only load slow code if we need it.

Fixes 8927

(cherry picked from commit 4c6044c13a)
2021-05-25 15:05:26 -05:00
Mike Hardy
09e0cce143
fix(DickPicker): invalidate options menu after deck delete
this causes a rebuild of the options menu with the side effect that undo
will be made invisible again - previously it was there even though deck delete
clears the undo queue, which led to crashes

Fixes #8935

(cherry picked from commit 4c30d333d9)
2021-05-25 13:12:19 -05:00
Mike Hardy
baf5fa1cb9
fix: if resolver throws fetching display name, continue to MIME attempt
Fixes #7748 - ContentResolver can throw while fetching DISPLAY_NAME column,
for unknown reasons. We were avoiding a crash after #7754 but we were still
aborting the paste. Now we will continue with a MIME attempt for display name
and maybe paste successfully. Crash will still be avoided.

(cherry picked from commit be77639b01)
2021-05-25 13:10:03 -05:00
Mike Hardy
17eadee486
lint: minor de-lint of ContentResolverUtil
just null checking / annotation

(cherry picked from commit f9153d7e85)
2021-05-25 13:10:02 -05:00
AnkiDroid Translations
754cdd3fe4
Updated strings from Crowdin
(cherry picked from commit a6cc6e1d6f)
2021-05-25 09:43:46 -05:00
David Allison
f56cbc076c
fix: SchedV2 was used instead of SchedV1
SchedV1 did not have the 'schedVer' variable set unless a downgrade
was performed. Existing users of SchedV1 did not have this variable set
so they were using SchedV2 without having gone through the upgrade
process.

Therefore they used 'fDefaultSchedulerVersion' which was bumped to 2

Now, instead of using the default, we set the value explicitly

Fixes #8926

(cherry picked from commit dff7728395)
2021-05-25 08:25:53 -05:00
Mike Hardy
a5c5e9fe96
Bumped version to 2.15.0
@branch-specific
2021-05-24 18:28:34 -05:00
Arthur Milchior
7071390aee
Uses correct locale
a862073a8f was merged without third party review. So I guess that nothing is really
obviously correct. We have a method that returns the user's locale. There is no point in indicating a locale if it is
always ROOT.

(cherry picked from commit 6d96bbebd6)
2021-05-23 10:25:17 -05:00