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

12547 Commits

Author SHA1 Message Date
Nicola Dardanis
03f68bd29e refactor: Add explicit fall through DOWN case in 'slide' 2021-04-24 22:31:29 -05:00
Nicola Dardanis
a5dbe4bd12 fix: Restore no animation settings to start Previewer from CardBrowser 2021-04-24 22:31:29 -05:00
Nicola Dardanis
d9dcbb9870 refactor: Use androidx Activity APIs in CardBrowser 2021-04-24 22:31:29 -05:00
Nicola Dardanis
386e2674a4 feat: Add androidx Activity APIs support in AnkiActivity 2021-04-24 22:31:29 -05:00
Nicola Dardanis
4fa5cca7ec feat: Add help method 'getAnimationOptions' 2021-04-24 22:31:29 -05:00
Farjad Ilyas
b8093d9c7a colIsOpen check in DeckPicker before dependent ops
- Since colIsOpen() is always true if its possible to open Collection..
- Maintains same behavior, but uses colIsOpen instead of getColSafe in:
    - onPrepareOptionsMenu()
    - onResume()
- Call displaySyncBadge from onCreateOptionsMenu() only if colIsOpen()
- No more predictable StorageAccessExceptions from getColSafe()
2021-04-24 22:20:34 -05:00
Mike Hardy
e70b586b61 Bumped version to 2.15alpha45
@branch-specific
2021-04-25 01:03:36 +00:00
AnkiDroid Translations
547524e06e Updated strings from Crowdin 2021-04-24 19:52:36 -05:00
Mike Hardy
855e2eaeb2 NF: add timrae copyrights 2021-04-24 15:06:20 -05:00
Piyush Goel
d459245a11
Lablels added to the seekbar for reviewing dayOffset preference (#8657)
Co-authored-by: Mike Hardy <github@mikehardy.net>
2021-04-24 14:07:03 -05:00
Mike Hardy
a3cd40ae81 NF: add copyrights for Mike Hardy files 2021-04-24 12:45:01 -05:00
Rodrigo Silva
d26f46c089
Add Statistics regression test to #8626 (#8655)
* Add Statistics regression test to #8626
2021-04-24 12:34:36 -05:00
Mike Hardy
e21aaaf945 Remove unused libs dependency from AnkiDroid+api build.gradle
This was vestigial - it existed since the Eclipse build, prior to gradle build
7 years ago, and we have never vendored libs as far as I know. Removing
2021-04-24 11:48:36 -05:00
Mike Hardy
1e7b027896 ACRA has not used WAKE_LOCK since 5.4, no need for replace attribute
it was added for ACRA, now is unused by ACRA, remove it to remove a warning
2021-04-24 11:48:36 -05:00
Mike Hardy
fe32002ae9 Run module-specific / variant-specific lint checks
The conversion to variants in #8151 meant AnkiDroid did not have a valid
lintRelease target anymore so it was not running in CI as expected

Using the variant-specific name makes it work, and splitting the checks into
specific ones for each sub-module should make it obvious in the future if any
further variant-related work happens

Fixes #8669
2021-04-24 11:31:27 -05:00
Mario
98687fc8bc Implementing instances of com.ichi2.preferences.IncrementerNumberRangePreference instead of com.ichi2.preferences.NumberRangePreference for Preferences, DeckOptions and FilteredDeckOptions 2021-04-24 09:50:34 -05:00
Akshay
c876b8f25a Implement Shortcut option without opening app 2021-04-24 09:47:48 -05:00
Arthur Milchior
c3041b7114 Add description for counts in deck picker
It's especially important because it is a link entirely unrelated to the number it contains.
This should probably be removed, because it's confusing, not clear that clicking on number will do something specific,
nor what it will do. This is not only an accessibility question. In the meantime, describing seems better
2021-04-24 09:41:08 -05:00
Arthur Milchior
c5217103ec Add content description for numbers in deck picker
I believe it is required because those numbers are not clear (actually, not clear even without context), and the top of
the column is not accessible as we are not using a table
2021-04-24 09:41:08 -05:00
Arthur Milchior
26d92aadcf NF: newValue->newFieldContent 2021-04-24 09:19:00 -05:00
Arthur Milchior
4c29134012 NF: newValue->fieldContentCorrected
Just to make name more clear
2021-04-24 09:19:00 -05:00
Arthur Milchior
82d21ad264 NF: currentValue->fieldContent
"Value" is vague term, it makes it clearer
2021-04-24 09:19:00 -05:00
Arthur Milchior
d0201e4138 NF: oldValue->oldOrder
This way it's also clearer what is represented
2021-04-24 09:19:00 -05:00
Arthur Milchior
550a47d52a NF: newValue to newORder
This way, it's clearer what is actually represented
2021-04-24 09:19:00 -05:00
David Allison
b58dd95ff8
Fix: Prevent crash on long pressing at end of card browser (#8665)
Fix #8467: Prevent crash on long pressing an already selected card

We were incorrectly using .getChildAt() which returns the view
based on the visual position. Once we got past the end of the
first "page" of the list, we got a crash.

We now update the data, and have the adapter set the checked state
when the data comes into the foreground

Co-authored-by: Shridhar <shridhar.goel@gmail.com>
2021-04-24 06:07:18 +02:00
Arthur Milchior
85c332ee32 NF: Remove a variable used a single time
This is not entirely equivalent, as it creates more listener. But the cost is negligeable and I believe the code quality
is improved
2021-04-23 22:59:42 -05:00
Arthur Milchior
d8c66722e7 NF: simplify ScheduleCollectionTaskListener
Really, there is no reason at all to use an abstract class instead of a constructor...
2021-04-23 22:59:42 -05:00
Prateek Singh
11667f9de6 Updated Fixed Title length lint rule 2021-04-24 02:38:37 +02:00
Prateek Singh
761459fb7c Fixed Lint Errors 2021-04-24 02:38:37 +02:00
David Allison
83ee966c1d lint: add missing copyright
All my files, all in 2020, I learned in 2021

Fixes partially 8659
2021-04-23 16:02:56 -05:00
Mike Hardy
d29fd1ea3a Bumped version to 2.15alpha44
@branch-specific
2021-04-23 14:36:59 +00:00
AnkiDroid Translations
b086bba688 Updated strings from Crowdin 2021-04-23 08:44:05 -05:00
Mike Hardy
08f8af5dcc
Dependency updates 20210422 (#8661)
* Bump fragment from 1.3.2 to 1.3.3 (#320)
* Bump fragment-testing from 1.3.2 to 1.3.3 (#319)
* Bump mockito-inline from 3.8.0 to 3.9.0 (#318)
* chore: bump sqlite-android to 3.35.4, re-point upstream

Upstream is now off jcenter officially after collaboration + merge of:
https://github.com/requery/sqlite-android/pull/145

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-23 07:56:29 -05:00
dorrin-sot
6b8a04e348
Test: Check if Illegal Characters at the start of Fields get handled (#8622)
* Test: Check if Illegal Characters at the start of Fields get handled

Co-authored-by: David Allison <62114487+david-allison-1@users.noreply.github.com>
2021-04-23 07:55:05 -05:00
Akshay Vilas Jadhav
9ed019979e
Implement Create New Deck Function In Add Note Activity (#8438)
* Created CreateDeckDialog class and ShowDialog Test
* replaced deck picker dialog code by CreateDeckDialog
* replaced DeckPickerFloatingAction dialog code by CreateDeckDialog
And extracted initialization code of NoteDeckSpinner to separate function
* Added Deck Create Function in DeckSelectionDialog
* optimized showFilteredDeckDialog fucntion from CreateDeckDialog
* NF: correct relocated method name in logging
2021-04-23 07:53:28 -05:00
Tarekk Mohamed Abdalla
04ae9f9c98 copyright: TarekkMA 2021-04-23 07:52:19 -05:00
Tarekk Mohamed Abdalla
af78fc4845 NF: embed progress bar in the layout 2021-04-22 14:04:45 -05:00
Tarekk Mohamed Abdalla
9014ab35b3 NF: extract progress_bar_layout to file 2021-04-22 14:04:45 -05:00
Mrudul Tora
6d68424cd4
Fixes #8151 Build flavors for Amazon Appstore and Google Playstore (#8427)
Fixes #8151 Build flavors for Amazon Appstore and Google Playstore
2021-04-19 22:39:06 -05:00
Đặng Đoàn Đức Trung
8c6b2fc9cc
Fixing gestures with answer buttons not working (#8579)
* Refactor performClickWithAction to answerCard

* Remove all mentions of performClickWithVisual

* Add visual feedback to gestures and touch events

* Add back overridden method and some code formatting

* Cherry pick from revert-touch

* Replace touch handler with a class encompassing both click and touch handlers

* Fixing logic

* Fix lint

* Logic documentation

* Add documentation to click threshold constant

Co-authored-by: Mike Hardy <github@mikehardy.net>

* Test optimization

Co-authored-by: David Allison <62114487+david-allison-1@users.noreply.github.com>
Co-authored-by: Mike Hardy <github@mikehardy.net>
2021-04-18 15:20:57 -05:00
Tarekk Mohamed Abdalla
5394865cbe NF: embed progress bar in the layout 2021-04-18 13:08:01 -05:00
David Allison
143d7bbf7c Fix: Duplicate cards shown in Card Browser
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
2021-04-18 12:28:39 -05:00
Nicola Dardanis
d63f8ebaa7 refactor: Open Previewer from CardBrowser using new Activity APIs 2021-04-16 10:43:24 -05:00
Mike Hardy
74c34cc0d6 Bumped version to 2.15alpha43
@branch-specific
2021-04-16 04:44:49 +00:00
Mike Hardy
213dd10094 remove jcenter maven repository
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
2021-04-15 23:21:34 -05:00
Mike Hardy
60f0e1f8fc NF: remove unused espresso / androidTest view watcher
this allows us to purge our last jcenter dependency
2021-04-15 23:21:34 -05:00
Mike Hardy
b50866e13d Use jitpack to reference sqlite-android artifact
requery / sqlite-android was still using jcenter, which is going away

This is tracked upstream:
https://github.com/requery/sqlite-android/issues/140
https://github.com/requery/sqlite-android/pull/145
2021-04-15 23:21:34 -05:00
Mike Hardy
61cb6c3f05 Update to gradle 7.0
- 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
2021-04-15 23:21:34 -05:00
Arthur Milchior
5f709dfe16 NF: BuryCard undo's affect the Card
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
2021-04-15 23:18:03 -05:00
Arthur Milchior
64c9d8f9d6 NF: add revertCardToProvidedState
Similar to the note one
2021-04-15 23:18:03 -05:00