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

14574 Commits

Author SHA1 Message Date
David Allison
78b64f4895 refactor(IntegerDialog): use named arguments
The list of arguments was unclear
2022-03-15 21:36:37 -05:00
David Allison
c1ff52867d fix lint: ImpliedQuantity
The quantity 'one' matches more than one specific number in this locale
(1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, à), but the message did not
include a formatting argument (such as %d).

This is usually an internationalization error.

See full issue explanation for more. [ImpliedQuantity]

Renamed reschedule_cards_dialog_title to reschedule_cards_dialog_title_new
* removed reschedule_cards_dialog_title as lint warnings occurred

Issue 10481 - also needs a translation sync
2022-03-15 21:36:37 -05:00
Divyansh Kushwaha
486e43a71f
startActivityForResult migration in Preferences.kt (#10535) 2022-03-15 21:25:57 -05:00
Divyansh Kushwaha
dd6205af86
migration from startActivityForResult to new API in ModelBrowser.java (#10533)
Co-authored-by: David Allison <62114487+david-allison@users.noreply.github.com>
2022-03-15 21:21:54 -05:00
David Allison
45ed78db55 fix(compat): Add Nullability annotations
Makes for an easier Kotlin conversion
2022-03-15 21:21:08 -05:00
David Allison
44acdbd75b refactor(preferences): improve editing (Kotlin) 2022-03-15 21:20:25 -05:00
Deepanshu Pratik
0d2ed63336
KotlinCleanup File-> Storage Test changed var to val (#10534) 2022-03-16 00:57:12 +05:30
Anam Ansari
dbe04e41a5
Enabled lint check "ObsoleteLayoutParam" (#10498) 2022-03-15 12:03:46 -05:00
David Allison
3063aa95ad fix(docs): Wrong tag value
The previous formulation produced lint warnings
2022-03-15 08:05:33 -05:00
Mike Hardy
c8be7842e0 Bumped version to 2.16alpha51 2022-03-14 22:48:26 +00:00
AnkiDroid Translations
475312ae1d Updated strings from Crowdin 2022-03-14 17:13:46 -05:00
David Allison
730d97008a docs: Drawing Activity
User asked how to access this screen. Seemed sensible to document it.
2022-03-14 15:14:19 -05:00
Tharun K
e27213356d
chore(lint, javascript): added prettier check (#10500)
* feat(prettier-check): added .prettierrc + workflow
* feat(prettier-check): ran prettier + .prettierignore
* feat(prettier-check): check if npx is installed

pre-commit now skips Prettier check if `npx` is not present.
2022-03-14 15:09:16 -05:00
Divyansh Kushwaha
0c49c6b2de
Kotlin Cleanup in DeckPickerFloatingActionMenu.Kt (#10525)
Co-authored-by: David Allison <62114487+david-allison@users.noreply.github.com>
2022-03-14 20:08:03 +00:00
David Allison
88e48e423e Relative File Paths
For use in conflict management in scoped storage.  Once we have a relative path,
we can move it to "/conflict/" + path and properly handle the creation of
directories.
2022-03-14 14:31:35 -05:00
Arthur Milchior
38d00b0e11 NF: remove createDirectory
It was confusing to have both `createDirectory` and
`createTransientDirectory`. Plus, we almost never really need a `Directory` but
its underlying `File`.

This remove confusion in which method to use, what are the difference between
them, and it remove even some `.direction`, at the cost of two helpers methods
that encapsulate File in Direction when required
2022-03-14 14:31:35 -05:00
Prince kushwaha
edaf6febd0
Enable TextFields lint (#10506)
* Enable TextFields lint
* add break line
* fix issue
2022-03-14 10:00:46 -05:00
David Allison
d18c271e4c docs(TaskManager): 'waitToFinish' null value
Explain "null" semantics
2022-03-14 09:51:26 -05:00
David Allison
80ddda027f docs(TaskManager): param was nullable
`null` is passed to `waitToFinish`
2022-03-14 09:51:26 -05:00
Divyansh Kushwaha
e07c9083ac
KotlinCleanup AnkiDroidWidgetSmall / Java methods to kotlin equivalents (#10524) 2022-03-14 09:47:16 -05:00
David Allison
41656b6b75 refactor(tests): Improve Performance
Add `EmptyApplication` as these tests don't depend on AnkiDroid

Shaves 40/50s off test time
2022-03-14 17:20:33 +05:30
Arthur Milchior
1d5ccb5620 NF: rename folder to directory
Simply for the sake of consistency. It will ensure that when searching for a
method, function or variable name, I have a single word to look for

This was done by a simple search and replace in .java and .kt files, preserving
case.

The only exception being org.junit.rules.TemporaryFolder and its method
`newFolder`, which obviously was not renamed.

Note that `folder` can't be entirely renamed to `directory` either because of
the class `DirectoryStream`. It seems even Java is not consistent between Folder
and directory
2022-03-14 16:12:07 +05:30
Arthur Milchior
79ea132f02 NF: factorize createPermissionDenied
It is used to factorize code repeated 6 times
2022-03-14 15:57:56 +05:30
Arthur Milchior
7df299e361 NF: Directory.createTransientDirectory return File
It was never actually used as a directory
2022-03-14 15:57:36 +05:30
Divyansh Kushwaha
504ecf07a2 removed redundant @KotlinCleanup from Preferences.kt 2022-03-14 10:22:10 +05:30
Divyansh Kushwaha
e99f828822
kotlin cleanup, changed variable name val -> value (#10519) 2022-03-13 18:06:51 +00:00
Prince kushwaha
29b8a3a88d Enable LogConditional lint 2022-03-13 15:04:10 +05:30
David Allison
e32b63c9b6 Convert WhiteboardMultiTouchMethods.java -> kt
com.ichi2.anki.WhiteboardMultiTouchMethods

No rename commit as git detects the rename
2022-03-13 14:47:25 +05:30
Kilian Trosien
99cc0bc6aa [Kotlin Cleanup] BackupManager
- In DeckPickerNoSpaceToDowngradeDialogRemoving: removing collection's nullability was a minimal necessary change in order achieve compilation.
- In BackupManagerTest: replaced empty string by collection's default path to avoid test failure caused by NPEs. The affected method should have not be called with an empty string describing the path beforehand.
2022-03-13 01:59:05 +01:00
Akarsh Shukla
3c7b56d88f removing translatable 2022-03-12 23:12:03 +01:00
Akarsh Shukla
ffbd97c31c lowercase string resources 2022-03-12 23:12:03 +01:00
Akarsh Shukla
2b32adefc6 Removing changes in README.md 2022-03-12 23:12:03 +01:00
Akarsh Shukla
e67a129b62 debugging after lint tests 2022-03-12 23:12:03 +01:00
Akarsh Shukla
121bc037f3 transferring preferences.xml to values 2022-03-12 23:12:03 +01:00
Akarsh Shukla
e3258f79c0 replacing string literals with string constants in preferences_reviewing.xml' 2022-03-12 23:12:03 +01:00
Mike Hardy
a9ca2cfa85 Bumped version to 2.16alpha50 2022-03-11 23:39:06 +00:00
AnkiDroid Translations
9876bf44e7 Updated strings from Crowdin 2022-03-11 17:52:21 -05:00
dependabot[bot]
d71e10a1ca chore(deps): bump mockito-inline from 4.3.1 to 4.4.0
Bumps [mockito-inline](https://github.com/mockito/mockito) from 4.3.1 to 4.4.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.3.1...v4.4.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-11 17:35:06 -05:00
Shridhar Goel
82a02f7858 Enhancements in CardBrowserMySearchesDialog.kt 2022-03-11 17:01:52 -05:00
puranjayK
36296fc8c2 Migrate Consts to Kotlin 2022-03-11 16:51:30 -05:00
puranjayK
660d121261 Rename .java to .kt 2022-03-11 16:51:30 -05:00
gradle-update-robot
5511174a50 Update Gradle Wrapper from 7.4 to 7.4.1.
Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc>
2022-03-11 16:22:11 -05:00
Brayan Oliveira
0ff7914183 Add show all hints gesture/command 2022-03-11 15:31:12 -05:00
Brayan Oliveira
1bab66d297 Add show hint gesture/command 2022-03-11 15:31:12 -05:00
Kilian Trosien
d2475449d4 Migrate TaskListenerWithContext.java to Kotlin 2022-03-11 14:50:51 -05:00
Kilian Trosien
d18e2c8139 Rename .java to .kt 2022-03-11 14:50:51 -05:00
Mike Hardy
a0642f573e
fix(kotlin): point to MAIN by default so PRs do not have conflicts 2022-03-11 14:36:02 -05:00
David Allison
796dd88726 refactor(scoped-storage): rename parameter
context -> throwingOperation
2022-03-11 20:28:31 +01:00
David Allison
b66fc61407 feat(scoped-storage): Retry DeleteEmptyDirectory
If DeleteEmptyDirectory fails, we want to perform
the MoveDirectory that spawned it

This could happen for many reasons, such as a failed file
move, or adding a file to `AnkiDroid` during the process
2022-03-11 20:28:31 +01:00
David Allison
d4635f629d refactor(scoped-storage-test): Introduce executor
A future commit will want to handle accessing the queue
 while the executor is executing. executeAll() did not allow this

So provide an executor which has the list of operations public

The general design is TBC, but the functionality will be used in prod
2022-03-11 20:28:31 +01:00