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
Robozinho
47ca03d1d4
improve media sync message
2024-06-09 17:34:59 +00:00
AnkiDroid Translations
41eea1e220
Updated strings from Crowdin
2024-06-09 17:16:35 +00:00
Robozinho
f99a288bf4
fix navbar color in reviewer
2024-06-09 09:10:44 +00:00
David Allison
79286aaad3
lint(collection): make non-open
...
Fixes a few warnings
2024-06-09 09:07:04 +00:00
David Allison
a8b22f6dd3
build: extract 'TestUtils' to 'common' module
...
A number of circular dependencies on 'compat' meant
that all functionality could not be extracted from 'AdaptionUtil'
* We need to extract 'isRobolectric'
* isRunningAsUnitTest is an easy extraction
* added in 7ada532c5c
2024-06-07 20:23:17 +00:00
David Allison
eed9ca8b4d
build: create 'common' module
...
* Defined as 'Android Library'
* Replaced junit reference with vintage engine
* to match project
* Removed example unit tests
2024-06-07 20:23:17 +00:00
David Allison
20add73857
refactor(card-browser): updateSelectedCardsFlag ( #16547 )
...
* refactor(card-browser): Card param -> CardId
We're going to refactor `updateSelectedCardsFlag` to
return cids and these were all that is required
* refactor(card-browser): remove unused method
* searchWithFilterQuery
* refactor(card-browser-view-model): update flags
* onEach { load() } called collection.load
* broken in 0d69cacde9
2024-06-06 08:12:35 -05:00
David Allison
e14aec6eec
docs: ChangeManager.Subscriber - lambdas
...
Documented that lambdas should not be used
Issue 16541
2024-06-06 08:13:22 +00:00
sargamgayatri0803@gmail.com
2e634d0cc4
focus keyboard
2024-06-06 08:12:34 +00:00
AnkiDroid Translations
3675f72aba
Updated strings from Crowdin
2024-06-05 17:25:06 +00:00
AnkiDroid Translations
b01fdd3a45
Updated strings from Crowdin
2024-06-05 16:31:20 +00:00
Robozinho
149116c45b
Productionise webview ≥ 77 check
...
fixes 15855
Co-authored-by: aayush-tripathi <112811133+aayush-tripathi@users.noreply.github.com>
2024-06-05 16:27:16 +00:00
Sumit Singh
5c89baba40
lint to avoid using android.app.AlertDialog
2024-06-05 15:04:40 +00:00
Moreno
8e1c71a54c
use appcompat AlertDialog
2024-06-05 13:26:45 +00:00
David Allison
de409a5b96
fix(tests): change subscription - flaky
...
This was caused because a WeakReference
to the lambda was used, which went out of scope.
This meant `changes` was not incremented
CardBrowserViewModel:
* suspend - notes - some cards suspended
* suspend - notes - all suspended
* etc...
Fixes 16541
2024-06-05 13:23:55 +00:00
David Allison
960951fb27
fix: close WorkManager test DB
...
A number of errors were produced
2024-06-05 08:59:08 +00:00
David Allison
b3e96fce88
chore(card-browser): logs
...
* moved setup higher in setUp to capture more
Diagnostics for https://redirect.github.com/ankidroid/Anki-Android/issues/16541
2024-06-05 08:59:08 +00:00
David Allison
aec1987ceb
tests(card-browser-view-model): export data
2024-06-05 08:56:00 +00:00
David Allison
f2cca9332b
test: improve 'getLatestAlertDialog' error
...
Previously this resulted in a `NullPointerException`
before:
```
java.lang.NullPointerException: null cannot be cast to non-null type androidx.appcompat.app.AlertDialog
```
after:
```
org.opentest4j.AssertionFailedError: A dialog should be displayed ==> expected: not <null>
```
Seen in https://redirect.github.com/ankidroid/Anki-Android/pull/16529
2024-06-04 16:54:00 +00:00
David Allison
812fd2cbc2
chore(card-browser): logs
...
Diagnostics for https://redirect.github.com/ankidroid/Anki-Android/issues/16541
2024-06-04 16:50:30 +00:00
David Allison
b5acdca0ab
fix(note-editor): filtered card sent home after edit
...
If a card in a filtered deck was edited, it was
returned home
Cause: b455b7b135
Fixes 16522
2024-06-04 11:49:04 +00:00
Mike Hardy
8d5d3dac93
test(custom-scheduler): add retries, re-enable in CI
...
with appropriate retries it appears to work reliably
2024-06-03 18:12:35 +00:00
Mike Hardy
7030339ed8
test(reviewer): accept different view names for custom scheduler tests
...
without this, `./gradlew jacocoAndroidTestReport` would not work on the command
line, but the tests would work in Android Studio, which is quite bizarre
2024-06-03 18:12:35 +00:00
AnkiDroid Translations
c3da9b615f
Updated strings from Crowdin
2024-06-03 18:09:21 +00:00
sargamgayatri0803@gmail.com
9c949d616e
focus keyboard on RenameCardTemplateDialog
2024-06-03 18:08:11 +00:00