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

7895 Commits

Author SHA1 Message Date
David Allison
03e41e7fe6 refactor: Kotlin Cleanup: nullability 2022-05-12 08:12:07 -05:00
David Allison
f80c4e8a3e refactor: Kotlin Cleanup: nullability 2022-05-12 08:12:07 -05:00
lukstbit
ca058f9226 Remove useless abstraction for IControllerFactory 2022-05-12 07:56:00 -05:00
David Allison
2902cff08d docs: Rationale for @NeedsTest
Explain the impact now: new contributors think about tests,
and encourage tests to be written without being overbearing

And future plans: moving to a codebase with better coverage and
better formalizing the requirements for writing a test for GSoC
2022-05-12 07:46:05 -05:00
Jatin
df38bc3f49
[KotlinCleanup] AsyncDialogFragment.kt (#11287) 2022-05-12 10:02:58 +01:00
oyeraghib
888b518ac2 [Kotlin Cleanup] ListUtil 2022-05-11 09:18:05 -05:00
oyeraghib
e992dab68d [Kotlin Cleanup] Various 2022-05-11 09:02:18 -05:00
Nishant Bhandari
6148c90ebb
Allow only single imports on the .colpkg option. (#11303) 2022-05-11 08:47:06 -05:00
oyeraghib
20ff63ae8d [Kotlin Cleanup] CollectionTaskCheckDatabaseTest 2022-05-11 08:34:54 -05:00
lukstbit
6dff1b63c5 Remove code related to translation from project 2022-05-11 08:33:19 -05:00
lukstbit
8d9e79f90b Migrate FieldControllerBase.java to kotlin
This PR has changes besides the output of the java-kotlin IDE migration tool:
- the tool made the fields in FieldControllerBase as nullable which triggered a lot of changes in
subclasses for adding !!. To reduce the number of changes this PR tackles the nullability of the class properties and
made them lateinit var
- there's one extra getter method added for the mActivity field because one of the subclasses' test requires access to
the field. It is possible to access protected fields from the same packages in java but this isn't possible in kotlin
code.
2022-05-11 08:17:27 -05:00
lukstbit
6807964cba Rename FieldControllerBase.java to .kt 2022-05-11 08:17:27 -05:00
oyeraghib
51059791c2 [Unit Test] ThreadUtilTest.kt 2022-05-11 08:08:20 -05:00
Mike Hardy
a145c032fd Bumped version to 2.16alpha65 2022-05-11 01:15:54 +00:00
lukstbit
078d4bd3b8 Migrate TagsList.java to Kotlin 2022-05-10 19:55:24 -05:00
lukstbit
663cc197cf Rename TagsList.java to .kt 2022-05-10 19:55:24 -05:00
lukstbit
05d3369abe Migrate RemoteMediaServer.java to Kotlin 2022-05-10 19:40:55 -05:00
lukstbit
dd90cff363 Rename RemoteMediaServer.java to .kt 2022-05-10 19:40:55 -05:00
AnkiDroid Translations
c9c54fa26a Updated strings from Crowdin 2022-05-10 18:27:07 -05:00
Brayan Oliveira
2d589f2bd0
Fix supportInvalidateOptionsMenu deprecation (#11312)
* Fix supportInvalidateOptionsMenu deprecation on CardBrowser.kt
Substituted for equivalent `invalidateOptionsMenu()`
* Fix supportInvalidateOptionsMenu deprecation on AbstractFlashcardViewer.kt
Substituted for equivalent `invalidateOptionsMenu()`
* Fix supportInvalidateOptionsMenu deprecation on DeckPicker.kt
Substituted for equivalent `invalidateOptionsMenu()`
* Fix supportInvalidateOptionsMenu deprecation on CardTemplateEditor.kt
* Fix supportInvalidateOptionsMenu deprecation on MultimediaEditFieldActivity.kt
* Fix supportInvalidateOptionsMenu deprecation on NavigationDrawerActivity.kt
* Remove supportInvalidateOptionsMenu on MyAccount.kt
it doesn't have a options menu to invalidate, so it isn't necessary
2022-05-10 18:26:39 -05:00
Mike Hardy
ae95643f1f
build(deps): Dependency updates 20220510 2022-05-10 18:07:18 -05:00
lukstbit
aaf54cd325 Refactor ArgumentUtils into BundleUtils 2022-05-10 17:51:05 -05:00
Jatin887
43ac8d071c [KotlinCleanup] TranslationActivity.kt 2022-05-10 15:19:04 -05:00
David Allison
efc9bf6d0c refactor: Convert MultimediaEditFieldActivity to Kotlin
com.ichi2.anki.multimediacard.activity.MultimediaEditFieldActivity
2022-05-10 15:00:39 -05:00
David Allison
832e932592 refactor: Rename MultimediaEditFieldActivity.java to .kt
com.ichi2.anki.multimediacard.activity.MultimediaEditFieldActivity
2022-05-10 15:00:39 -05:00
Prince kushwaha
d717a46c6e Migrate TokenizerTest.java to Kotlin 2022-05-10 10:58:50 -05:00
Prince kushwaha
4f3a8715fc Rename TokenizerTest.java to TokenizerTest.kt 2022-05-10 10:58:50 -05:00
dorrin-sot
4a24fc0228
fix: Overflow Icon Color Change on Config Change (Orientation Change) (#11061) 2022-05-10 10:54:39 -05:00
Jatin
9631e8f4e4
[KotlinCleanup] ActivityExportingDelegate.kt (#11289) 2022-05-10 10:14:54 -05:00
dorrin-sot
8728a9647f
Fixed A:: last deck not being escaped to "blank" (#11131) 2022-05-10 09:58:33 -05:00
Nishant Bhandari
3a1d5aedd7
feat: import multiple files (#10851) 2022-05-10 09:53:06 -05:00
puranjayK
15cd719ba5 Added test message explanations 2022-05-10 15:50:42 +01:00
Mahathi Vempati
30811aa2d3
Truncate Option in Card Browser (#10863) 2022-05-10 08:55:54 -05:00
Brayan Oliveira
5007e3d2fd Add inverse finish transitions on Card info command
Overriding `onBackPressed()` is necessary because it triggered the default `finish()`, and finish() shouldn't be directly overriden because AnkiActivity deprecates it

Overriding `onActionBarBackPressed()` is necessary because super's (AnkiActivity) equivalent finishes without animation
2022-05-10 08:31:56 -05:00
Brayan Oliveira
cf0cfbb1cd Add inverse finish transitions on Add note and Edit note commands
Both are NoteEditor's actions, so they can be handled together
2022-05-10 08:31:56 -05:00
Brayan Oliveira
442b009a0e Move openCardInfo() to Reviewer.kt
Reviewer is the only inheritor of AbstractFlashcardViewer which calls `openCardInfo`

Another reason is to simplify the use/importing of the constants/methods necessary to implement the reverse transitions on finish
2022-05-10 08:31:56 -05:00
Brayan Oliveira
10cbe75d81 Rename CALLER_REVIEWER to CALLER_REVIEWER_EDIT
Since there is a `CALLER_REVIEWER_ADD` constant, it wasn't clear what was the supposed use of `CALLER_REVIEWER`
2022-05-10 08:31:56 -05:00
Brayan Oliveira
e3f8bd3d82 Add method to return the inverse transition of an animation direction
`getInverseTransition()`
2022-05-10 08:31:56 -05:00
Brayan Oliveira
a5ae9e8c24 Make possible to pass a finish animation on a intent
- Parcelize animation direction so it can be passed as an extra
- Add an extra key for finish animations
2022-05-10 08:31:56 -05:00
lukstbit
c6760bb2d0 Add NeedTest note for changes to list of note types 2022-05-10 08:23:03 -05:00
lukstbit
de4dde7ffa Make adapter in ModelBrowser to use the proper backing list 2022-05-10 08:23:03 -05:00
Nishant
4f58ed78df Fixed no splash screen in shortcuts. 2022-05-10 08:15:48 -05:00
Brayan Oliveira
e34874184b refactor: Convert CardTemplateEditor to Kotlin
com.ichi2.anki.CardTemplateEditor
2022-05-10 08:14:55 -05:00
Brayan Oliveira
1103912cc7 refactor: Rename CardTemplateEditor.java to .kt
com.ichi2.anki.CardTemplateEditor
2022-05-10 08:14:55 -05:00
Jatin887
d73d6bd066 [KotlinCleanup] Previewer.kt 2022-05-10 08:05:59 -05:00
Brayan Oliveira
c33e7ea8a6 Fix crash if no video or audio is selected on NoteEditor
Fixes handling of `audioPath` nullability and add tests
2022-05-10 07:48:44 -05:00
lukstbit
91ee9b25bb Migrate CsvReaderIterator.java to kotlin 2022-05-09 13:40:51 -05:00
lukstbit
f5a7d72875 Rename CsvReaderIterator.java to .kt 2022-05-09 13:40:51 -05:00
lukstbit
6857229658 Migrate CsvSniffer.java to kotlin 2022-05-09 12:59:57 -05:00
lukstbit
640ef9fec8 Rename CsvSniffer.java to .kt 2022-05-09 12:59:57 -05:00