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

19304 Commits

Author SHA1 Message Date
Brayan Oliveira
4aec82486b feat(new reviewer): card info 2024-06-21 17:35:10 +00:00
Mike Hardy
d2ddaaf122 Bumped version to 2.19alpha6 2024-06-20 15:38:31 +00:00
AnkiDroid Translations
f1732d35c9 Updated strings from Crowdin 2024-06-20 15:07:13 +00:00
Voczi
87b4ec91bb Exclude robolectric deps from release 2024-06-20 14:48:39 +00:00
David Allison
bd296276fb improvement(rename-flag): remove 'ok/cancel'
* This made it more obvious that the 'tick' should be pressed
* Cancel didn't work as expected
* OK didn't perform saves

Prompted by
https://redirect.github.com/ankidroid/Anki-Android/pull/16244#issuecomment-2180497998

Related: 16205
2024-06-20 13:38:39 +00:00
lukstbit
11f7d5a7c5 Change source/kotlin compatibility in common module to Java 11 2024-06-20 13:23:24 +00:00
lukstbit
8a75195321 Add proguard rules for common module
The rules added are the ones used by the :AnkiDroid module.
2024-06-20 13:23:24 +00:00
David Allison
bf5b6d1746 refactor: 'browser'-related APIs
All non-functional, in preparation for moving
to the backend for rendering
2024-06-20 12:01:24 +00:00
David Allison
dac0c2d6f1 docs: removeNotes 2024-06-20 12:01:24 +00:00
David Allison
6c39ce2858 docs: Flag.setUserFlag 2024-06-20 12:01:24 +00:00
David Allison
3d33211823 chore: darkenColor util 2024-06-20 12:01:24 +00:00
David Allison
f6653ea0ac chore: Float.clamp util 2024-06-20 12:01:24 +00:00
Mike Hardy
5a13cfba50 Bumped version to 2.19alpha5 2024-06-19 17:00:57 +00:00
David Allison
bebf14fece chore: ignore Kotlin 2 .salive files
This appears to be a 'session-is-alive' file

ca34e5d2fd/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt (L458)

Example:

.kotlin/sessions/kotlin-compiler-9293527262404664068.salive
2024-06-19 14:22:01 +00:00
AnkiDroid Translations
7a48bf2e38 Updated strings from Crowdin 2024-06-19 13:37:22 +00:00
David Allison
5c8919fc71 fix(browser): remove redundant ViewModel call
unnecessary logging from logs of 'setColumn[1/2]'
2024-06-19 12:52:53 +00:00
David Allison
1842858819 feat(browser): use backend column headings
removes strings:
* browser_column1_headings
* browser_column2_headings

Prep for Issue 11889
2024-06-19 12:52:53 +00:00
David Allison
4934841fa7 feat: setActiveBrowserColumns
For use in browserRowForId

Prep for Issue 11889
2024-06-19 12:52:53 +00:00
David Allison
68151e686c feat(preferences): improve browser columns
Breaking!
Updates the default columns from:

* QUESTION, ANSWER
to
* Cards: [Sort Field, Card Type, Due, Deck]
* Notes: [Sort Field, Note Type, Card Type/Type Count, Tags]

----

improvements:
* Support different columns for CARDS and NOTES mode
* Support more than 2 columns (not yet usable in the UI)

deprecates + upgrades shared prefs:
* "cardBrowserColumn1" - index into `COLUMN1_KEYS`
* "cardBrowserColumn2" - index into `COLUMN2_KEYS`

now (shared prefs):

* "activeCols" -> `|` separated list of column keys
* "activeNoteCols" -> `|` separated list of column keys

Prep for Issue 11889
2024-06-19 12:52:53 +00:00
David Allison
40610eee2f refactor: prep for multiple BrowserColumns
* Moves save/load into CardBrowserColumn
* Use the enum values, rather than the indices

Prep for Issue 11889
2024-06-19 12:52:53 +00:00
Mike Hardy
9bda35fa1a feat(ci): apk size comparison workflow 2024-06-19 07:11:43 -05:00
AnkiDroid Translations
03dff23f9b Updated strings from Crowdin 2024-06-18 20:46:48 +00:00
Aditya kumar
8e0b537b1d Undo was showing even if it is unavailable (fixed) 2024-06-18 17:56:34 +00:00
leobugeja
3b6288a913 feat: Toggle check pronunciation feature 2024-06-18 17:51:31 +00:00
Brayan Oliveira
14813c1553
chore: update to anki 24.06.2 and adopt SvelteKit (#16449)
* build(deps) bump anki backend to 0.1.39-anki24.06.2

* refactor: make PageFragment non abstract

some pages are now simple enough that can be created just with the path, like CardInfo

* chore: load SvelteKit assets

instead of individual pages

* chore: move CardInfo to SvelteKit

* chore: move AnkiPackageImporter to SvelteKit

* chore: move CongratsPage to SvelteKit

* chore: move CsvImporter to SvelteKit

* chore: move DeckOptions to SvelteKit

* chore: move Statistics to SvelteKit

* chore: handle POST requests in CardViewerViewModel

IO requests i18Resources now

* chore: move ImageOcclusion to SvelteKit

* refactor(PageFragment): remove unused properties
2024-06-18 12:35:42 -05:00
David Allison
cbb64a86b6
test(card-browser-view-model): increase coverage (#16562)
* test(card-browser-view-model): delete

* test(card-browser-view-model): select all

* test(card-browser-view-model): saved search

* test(card-browser-view-model): 'marked' search

* test(card-browser-view-model): 'suspended' search

* test(card-browser-view-model): preview intent
2024-06-18 09:06:28 -05:00
Shruti Gitte
b2f24d95de fix: use android import for crash report dialog 2024-06-18 05:04:21 +00:00
SanjaySargam
13189e0ac4 remove back button on large screen only
This bug existed for a long time which was unnoticed. Back button is useful on small screen when the fragment appears on a separate screen, and is not useful when the fragment appears near the deck-picker, where there is nowhere to go back to, so we could remove the button
2024-06-17 23:40:37 +00:00
AnkiDroid Translations
ee8087338d Updated strings from Crowdin 2024-06-17 17:46:53 +00:00
Ashish Yadav
0439663a69 feat(card-browser): rename flags
Done in the Card Browser options

Fixes 16205
2024-06-17 17:03:03 +00:00
AnkiDroid Translations
4e161d1d52 Updated strings from Crowdin 2024-06-17 16:42:54 +00:00
Mike Hardy
bb6bb032e1 build(deps): have dependabot ignore anki-android-backend dep
It resumed proposing PRs for this dependency after moving to the
version catalog style of version specification in gradle, which has
been confusing me.

I believe it is because the name now needs to be the version catalog
alias name, not the maven repository coordinates, with my hunch
based on the naming of the PRs now being an update for `ankiBackend`
vs the coordinates first
2024-06-17 12:51:08 +00:00
Mike Hardy
39fda2f977
Dependency updates 20240617 (#16609)
* Update Gradle Wrapper from 8.7 to 8.8.

Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc>

* chore(deps): bump com.google.protobuf:protobuf-kotlin-lite

Bumps com.google.protobuf:protobuf-kotlin-lite from 4.27.0 to 4.27.1.

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-kotlin-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump org.jetbrains.kotlinx:kotlinx-serialization-json

Bumps [org.jetbrains.kotlinx:kotlinx-serialization-json](https://github.com/Kotlin/kotlinx.serialization) from 1.6.3 to 1.7.0.
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.6.3...v1.7.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump androidxFragmentKtx from 1.7.1 to 1.8.0

Bumps `androidxFragmentKtx` from 1.7.1 to 1.8.0.

Updates `androidx.fragment:fragment-ktx` from 1.7.1 to 1.8.0

Updates `androidx.fragment:fragment-testing` from 1.7.1 to 1.8.0

Updates `androidx.fragment:fragment-testing-manifest` from 1.7.1 to 1.8.0

---
updated-dependencies:
- dependency-name: androidx.fragment:fragment-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.fragment:fragment-testing
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.fragment:fragment-testing-manifest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump androidGradlePlugin from 8.4.1 to 8.5.0

Bumps `androidGradlePlugin` from 8.4.1 to 8.5.0.

Updates `com.android.application` from 8.4.1 to 8.5.0

Updates `com.android.library` from 8.4.1 to 8.5.0

---
updated-dependencies:
- dependency-name: com.android.application
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.android.library
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump lint from 31.4.1 to 31.5.0

Bumps `lint` from 31.4.1 to 31.5.0.

Updates `com.android.tools.lint:lint-api` from 31.4.1 to 31.5.0

Updates `com.android.tools.lint:lint` from 31.4.1 to 31.5.0

Updates `com.android.tools.lint:lint-tests` from 31.4.1 to 31.5.0

---
updated-dependencies:
- dependency-name: com.android.tools.lint:lint-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.android.tools.lint:lint
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.android.tools.lint:lint-tests
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump com.github.triplet.play from 3.9.1 to 3.10.0

Bumps com.github.triplet.play from 3.9.1 to 3.10.0.

---
updated-dependencies:
- dependency-name: com.github.triplet.play
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: gradle-update-robot <gradle-update-robot@regolo.cc>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 07:58:11 -05:00
Eduardo Nazário
0858f2cf6b Fix #15553: Start of Next Day Not Working
Start of Next Day wasn't working when changing to the past
Fixed by using setPreferences instead of config.set
2024-06-17 12:12:39 +00:00
AnkiDroid Translations
8ea8704605 Updated strings from Crowdin 2024-06-16 08:36:05 +00:00
abdelrahmanesam
dcb10769b1 extract magic numbers to version catalog 2024-06-16 08:21:52 +00:00
David Allison
6c5e46ad21 docs: ensure BrowserColumns are documented 2024-06-15 23:45:16 +00:00
David Allison
e76f022ae8 chore: map CardBrowserColumn to backend column
We are going to remove this class and use the
backend for both the column definitions and the
retrieval of data

But before we do this, we want to map from a
complex index-based collection to the Anki Backend
Column keys, so users do not lose their settings in
the migration

This change verifies that the columns are mapped
and implemented the same way in the new backend
2024-06-15 23:45:16 +00:00
David Allison
f2cb684174 refactor: remove unused browser columns
Defined in neither
* COLUMN1_KEYS
* COLUMN2_KEYS

These define the order in
R.array.browser_column1_headings
R.array.browser_column2_headings

So they are unused

ID matched the `else` case in the `when`
for CardCache, and that returned `null`
2024-06-15 23:45:16 +00:00
David Allison
840f46b14c feat(col): expose browser table methods
33a923797a/pylib/anki/collection.py

33a923797a/pylib/anki/browser.py

Prep for Issue 11889
2024-06-15 20:22:17 +00:00
David Allison
a569c572d6 fix: AppWidgetManager can be null
On a Supernote A5X,
`AppWidgetManager.getInstance(context)`
returns `null`

https://www.reddit.com/r/Supernote/comments/1dcqk47/comment/l7znpix/
2024-06-15 20:18:22 +00:00
Ashish Yadav
32bf2c33b7 feature: use chipGroup instead of EditText
* enhancement: switch between modes using button
* unitTest: added unit tests for the viewmodel
* docs: viewmodel new methods documentation
2024-06-14 22:11:32 +00:00
Ashish Yadav
43d1e67f3e refactor: init deckspinner accept optional layout 2024-06-14 22:11:32 +00:00
AnkiDroid Translations
3921309d9e Updated strings from Crowdin 2024-06-12 17:26:55 +00:00
David Allison
7a48b84ffb refactor(card-browser): remove rowId references
CardBrowser will move to render using either
the card id or the note id

Our data is currently ALWAYS CardIds, which may be
transformed into NoteIds

We had code assuming that the CardId was always used
which needed to be modified to handle the case that
a DB call is needed to map NoteId <-> CardId

* selectedRowIds
* allCardIds
  * Now needs to be `suspend`
* get[Selected]CardIdAtPosition
  * Now needs to be `suspend`

Issue 11889
2024-06-12 15:09:49 +00:00
Sumit Singh
94de856406 Implement hold to record functionality 2024-06-10 17:15:13 +00:00
AnkiDroid Translations
de8aca2a7a Updated strings from Crowdin 2024-06-10 15:45:49 +00:00
Moreno
7072592247 add next card due message 2024-06-10 14:20:02 +00:00
AnkiDroid Translations
03fecf3732 Updated strings from Crowdin 2024-06-10 14:04:07 +00:00
AnkiDroid Translations
ba4808c1cf Updated strings from Crowdin 2024-06-09 18:39:09 +00:00