0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-19 19:42:17 +02:00
Commit Graph

17618 Commits

Author SHA1 Message Date
Mike Hardy
f8ea30d275
Dependency updates 20230630 (#14058)
* Bump com.squareup.leakcanary:leakcanary-android from 2.11 to 2.12

Bumps [com.squareup.leakcanary:leakcanary-android](https://github.com/square/leakcanary) from 2.11 to 2.12.
- [Release notes](https://github.com/square/leakcanary/releases)
- [Changelog](https://github.com/square/leakcanary/blob/main/docs/changelog.md)
- [Commits](https://github.com/square/leakcanary/compare/v2.11...v2.12)

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

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

* Bump org.jetbrains.kotlinx:kotlinx-coroutines-test from 1.7.1 to 1.7.2

Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-test](https://github.com/Kotlin/kotlinx.coroutines) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.7.1...1.7.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Bump com.github.triplet.play from 3.8.3 to 3.8.4

Bumps com.github.triplet.play from 3.8.3 to 3.8.4.

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

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

* Bump com.android.tools.build:gradle from 7.4.2 to 8.0.2 (#13912)

* Bump com.android.tools.build:gradle from 7.4.2 to 8.0.2

Bumps com.android.tools.build:gradle from 7.4.2 to 8.0.2.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* build(deps): forward-port BuildConfig / aidl / default-component to gradle 8

* convert to non-transitive R.attr style

- directly address the attributes via their specific names
- remove an R-containing IntDef since R is no longer constant
  (the whole UndoAction class will disappear with new backend anyway)

* Use attrs directly from `android`

Practically, it is a non-functional change, but is is best and more natural to use attrs directly from android instead of using `com.google.android.material` as a intermediate

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mike Hardy <github@mikehardy.net>
Co-authored-by: Brayan Oliveira <69634269+brayandso@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brayan Oliveira <69634269+brayandso@users.noreply.github.com>
2023-07-01 10:09:10 -05:00
zaghdaneh
8d6f5def38
Replace MaterialDialog with Alertdialog for ModelFieldEditor.kt (#13999)
* Replace MaterialDialog with Alertdialog for ModelFieldEditor.kt

* fix syntax, rewrite AlertDialog customView
2023-07-01 09:22:08 -03:00
Nishant
e43471aad2 Replaced MaterialDialog with AlertDialog in ImportDialog. 2023-06-30 21:06:14 -05:00
Sanjaykumar Sargam
1fc02794a6 set translate icon tint to blue 2023-06-30 20:46:45 -05:00
Brayan Oliveira
9b595b0fbd Don't open the GH commits page inside the changeLog view
It is better handled by a full web browser and it had the issue of links getting red
2023-06-30 15:38:32 -03:00
Brayan Oliveira
20b7440ab9 nf: simplify getting url in Info::shouldOverrideUrlLoading 2023-06-30 15:38:32 -03:00
Damien Elmes
7a104b2d7b
Run jacoco separately from lint to work around errors (#14052)
* Run jacoco separately to work around errors; use debug variant only

https://github.com/ankidroid/Anki-Android/issues/14048#issuecomment-1613923181

* Switch back to release
2023-06-29 21:44:38 -05:00
Mike Hardy
e2bec74646
Dependency updates 20230628 (#14046)
* Bump org.jlleitschuh.gradle:ktlint-gradle from 11.4.1 to 11.4.2

Bumps org.jlleitschuh.gradle:ktlint-gradle from 11.4.1 to 11.4.2.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle:ktlint-gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* build(deps): require JDK17 for the build, use JDK17 in workflows

17+ is a requirement for new AndroidX library versions, fragment library
lint rules in particular are already failing our lint workflow because
they no longer operate on JDK11

* Bump lint_version from 30.4.2 to 31.0.2

Bumps `lint_version` from 30.4.2 to 31.0.2.

Updates `com.android.tools.lint:lint-api` from 30.4.2 to 31.0.2

Updates `com.android.tools.lint:lint` from 30.4.2 to 31.0.2

Updates `com.android.tools.lint:lint-tests` from 30.4.2 to 31.0.2

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

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

* build: bump JDK source/target compat to JDK11

This is needed for new versions of deps, it passes
jacocoAndroidTestReport target against an API21 emulator (current
minSdkVersion) so seems to be compatible with all required things

* Bump org.mockito.kotlin:mockito-kotlin from 4.1.0 to 5.0.0

Bumps [org.mockito.kotlin:mockito-kotlin](https://github.com/mockito/mockito-kotlin) from 4.1.0 to 5.0.0.
- [Release notes](https://github.com/mockito/mockito-kotlin/releases)
- [Commits](https://github.com/mockito/mockito-kotlin/compare/4.1.0...5.0.0)

---
updated-dependencies:
- dependency-name: org.mockito.kotlin:mockito-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* build(deps): have gradle wrapper update PRs go into dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 11:06:44 -05:00
Sanjaykumar Sargam
57fa827aca horizontalPadding and warning 2023-06-28 07:04:01 -05:00
Ruliam dos Santos de Oliveira
7f66b6ad32
do not allow empty front field in note edit mode (#14044) 2023-06-28 06:57:43 -05:00
Mike Hardy
01528d19f8 Bumped version to 2.16.0beta4 2023-06-26 16:46:22 +00:00
AnkiDroid Translations
94a408d0e6 Updated strings from Crowdin 2023-06-26 11:43:43 -05:00
Brayan Oliveira
72d196982f set switch color without colorControlActivated
Changing colorControlActivated value originally had the purpose of tinting the preferences switches

Since this caused the problem of the text selector handle being the same color of the app bar on the light theme, using a more specific color selector should be preferred.

Android's color for the text handle is `colorControlActivated`, which defaults to `colorAccent` if not specified.

So, there are two ways to fix the issue:
1. Changing the handle style completely
2. Changing the switch/other widget colors

In order to keep the handle with a familiar look and compatible with Android future changes, and to make things simpler, it's better to avoid changing the handle, so this changes the switch color manually

To use the same color between the switch and other widgets (e.g. in SliderPreference), a `widgetColorActivated` attr similar to `colorControlActivated` was created
2023-06-26 09:12:38 -05:00
Brayan Oliveira
188ab39fc1 nf: SwitchPreference -> SwitchPreferenceCompat 2023-06-26 09:12:38 -05:00
oakkitten
6b7bbe0bf0 Fix card browser add icon appearing dark
As per the documentation,

> By default, all drawables instances loaded from the same resource
share a common state; if you modify the state of one instance, all the
other instances will receive the same modification.

In reviewer, tint is applied to the icons of overflow menu items.
Previously, the icons were not mutated, which lead to these icons
appearing dark when used in other activities.
2023-06-24 14:20:20 -03:00
Patrick Roe
f1a168c1ff
Added marketing images for play store (#13917)
* Added marketing images for play store

* Update play store marketing images

* Update playstore images to reflect v2.16

* Fix title bar for play store marketing image 3
2023-06-24 11:25:33 -05:00
oakkitten
b235803698 Fix crash when encountering bad storage volume UUID strings 2023-06-24 13:17:47 -03:00
snowtimeglass
6b96c94238 Fix reversal of correct/incorrect closing tag
On (the back side of) card templates in the current backend,
if you input an incorrect closing tag, for example, "{{#Tags}}blah{{/Ta}}",
Its preview says "Found '{/Tags}}', but expected '{{/Ta}}' ".

This commit will fix the inappropriate reversal.
In other words, the preview will say "Found '{/Ta}}', but expected '{{/Tags}}' "
as on the desktop version and in the advanced "new backend".
2023-06-23 19:12:49 -03:00
lukstbit
37f4d67d93 Add note on SeekBarPreference actually being used
The ide marks SeekBarPreference as being unsued although it's actually
used in the preferences file declared in DeckOptionsActivity.
2023-06-23 06:35:06 -03:00
lukstbit
744a835c80 Revert "nf: remove com.ichi2.ui.SeekBarPreference"
This reverts commit e426fd9599.
2023-06-23 06:35:06 -03:00
Mike Hardy
f3ccad55da Bumped version to 2.16.0beta3 2023-06-22 20:53:50 +00:00
Brayan Oliveira
7317297666 Add night theme pref icon 2023-06-22 15:44:14 -05:00
Brayan Oliveira
0b28a1f556 Add day theme pref icon 2023-06-22 15:44:14 -05:00
Brayan Oliveira
f94338ef1e Add theme pref icon 2023-06-22 15:44:14 -05:00
Brayan Oliveira
65810f1893 Make language pref icon consistent with the others 2023-06-22 15:44:14 -05:00
Brayan Oliveira
c64cdce8b1 Make header prefs' icons color use tint attr
Tints should be applied to a white fillColor in order to do a simple color override
2023-06-22 15:44:14 -05:00
Brayan Oliveira
26e3e9f81d nf: remove old xmlns from appearance prefs xml 2023-06-22 15:44:14 -05:00
Arthur Milchior
77903e66d7 Full Download lost connection show relevant error message 2023-06-22 15:41:42 -05:00
nihil-admirari
a04d9fec29 JS module loading for older Androids (fixes #9311) 2023-06-22 15:34:36 -05:00
Sanjaykumar Sargam
a907f17741 moved cursor to end 2023-06-22 17:28:29 -03:00
AnkiDroid Translations
fc26d6ea0d Updated strings from Crowdin 2023-06-22 15:17:53 -05:00
Brayan Oliveira
461d2390e8 fix: backend language not being set if changed to "System language"
`Locale.getDefault()` returns the app current language, so `getSystemLocale()` is used instead

Note that probably because of a platform bug, `getSystemLocale()` returns the app language as well on API 33, which *may* be fixed later because we are using an AppCompat alpha version
2023-06-22 15:16:41 -05:00
Brayan Oliveira
999aa686cd nf: simplify localeToBackendCode
It isn't necessary to create a Locale object just to get its language code
2023-06-22 15:16:41 -05:00
Brayan Oliveira
4528c5d483 nf: Rename constant 2023-06-22 15:16:41 -05:00
Ashish Yadav
5069ad604b
checking for bitmap size to avoid illegalArgumentException (#14001) 2023-06-22 14:56:33 -05:00
Arthur Milchior
0b4c6cbcb1 NF: Remove setTitle in AbstractFlashCardViewer
It probably should not be `NF`, but here it is. Because each time that
`setTitle` is called, `updateActionBar` is called immediately after and change
the title anyway.

In practice `setTitle` was setting a wrong title in the Reviewer, as it was
using current deck instead of the name of the current card.

Worse, while moving access to `col` to coroutine, I realized that this created
a race condition, where the title changed. That was catched by automated test,
so that's great actually.

We can also decide that actually, we wanted to keep `Preview` as title all the
time, and current behavior is a bug. In which case I suggest we move
`updateActionBar` to `Reviewer` and ensure it does not deal with title anymore.
2023-06-22 14:54:16 -05:00
Mike Hardy
ca18b6a2c2 fix build related to vanished transitive dependency of amazon publish plugin 2023-06-22 13:44:23 -05:00
Sanjaykumar Sargam
f9191b0e70 isolate keepScreenOn and timeoutAnswer from each other 2023-06-22 13:08:31 -03:00
Aayush Goel
99dc92ee5f
#12451 Issue: Replace string with plurals (#13616)
* Fix: #12451 Issue: Replace string with plurals

String key pairs have been changed by adding '_new" to the key. Ex.  name = "string_key" to name = "string_key_new"

Final Updates for Plural Candidates

* disambiguate apostrophe with expansion of text

---------

Co-authored-by: Mike Hardy <github@mikehardy.net>
2023-06-22 10:18:22 -05:00
Sanjay Sargam
ae44eef50a
Show keyboard in onResume state of Reviewer.kt (#13451) 2023-06-22 10:16:05 -05:00
Mike Hardy
bf54a8789d
Dependency updates 20230622 (#14020)
* Bump androidx.activity:activity-ktx from 1.7.1 to 1.7.2

Bumps androidx.activity:activity-ktx from 1.7.1 to 1.7.2.

---
updated-dependencies:
- dependency-name: androidx.activity:activity-ktx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Bump acra_version from 5.9.7 to 5.10.1

Bumps `acra_version` from 5.9.7 to 5.10.1.

Updates `ch.acra:acra-http` from 5.9.7 to 5.10.1
- [Release notes](https://github.com/ACRA/acra/releases)
- [Commits](https://github.com/ACRA/acra/compare/acra-5.9.7...acra-5.10.1)

Updates `ch.acra:acra-dialog` from 5.9.7 to 5.10.1
- [Release notes](https://github.com/ACRA/acra/releases)
- [Commits](https://github.com/ACRA/acra/compare/acra-5.9.7...acra-5.10.1)

Updates `ch.acra:acra-toast` from 5.9.7 to 5.10.1
- [Release notes](https://github.com/ACRA/acra/releases)
- [Commits](https://github.com/ACRA/acra/compare/acra-5.9.7...acra-5.10.1)

Updates `ch.acra:acra-limiter` from 5.9.7 to 5.10.1
- [Release notes](https://github.com/ACRA/acra/releases)
- [Commits](https://github.com/ACRA/acra/compare/acra-5.9.7...acra-5.10.1)

---
updated-dependencies:
- dependency-name: ch.acra:acra-http
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: ch.acra:acra-dialog
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: ch.acra:acra-toast
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: ch.acra:acra-limiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump org.jlleitschuh.gradle:ktlint-gradle from 11.3.2 to 11.4.1

Bumps org.jlleitschuh.gradle:ktlint-gradle from 11.3.2 to 11.4.1.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle:ktlint-gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump com.google.auto.service:auto-service-annotations

Bumps [com.google.auto.service:auto-service-annotations](https://github.com/google/auto) from 1.0.1 to 1.1.1.
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-common-1.0.1...auto-service-1.1.1)

---
updated-dependencies:
- dependency-name: com.google.auto.service:auto-service-annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump kotlin_version from 1.8.21 to 1.8.22

Bumps `kotlin_version` from 1.8.21 to 1.8.22.

Updates `org.jetbrains.kotlin:kotlin-gradle-plugin` from 1.8.21 to 1.8.22
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.21...v1.8.22)

Updates `org.jetbrains.kotlin:kotlin-stdlib` from 1.8.21 to 1.8.22
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.21...v1.8.22)

Updates `org.jetbrains.kotlin:kotlin-test` from 1.8.21 to 1.8.22
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.21...v1.8.22)

Updates `org.jetbrains.kotlin:kotlin-reflect` from 1.8.21 to 1.8.22
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.21...v1.8.22)

Updates `org.jetbrains.kotlin:kotlin-test-junit5` from 1.8.21 to 1.8.22
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.21...v1.8.22)

Updates `org.jetbrains.kotlin:kotlin-test-junit` from 1.8.21 to 1.8.22
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.21...v1.8.22)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit5
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Bump com.google.auto.service:auto-service from 1.0.1 to 1.1.1

Bumps [com.google.auto.service:auto-service](https://github.com/google/auto) from 1.0.1 to 1.1.1.
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-common-1.0.1...auto-service-1.1.1)

---
updated-dependencies:
- dependency-name: com.google.auto.service:auto-service
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Bump androidx.webkit:webkit from 1.6.1 to 1.7.0

Bumps androidx.webkit:webkit from 1.6.1 to 1.7.0.

---
updated-dependencies:
- dependency-name: androidx.webkit:webkit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 09:48:24 -05:00
naong
ed50e1acab
Improve stylus related functions(menu, controls) (#13849) 2023-06-22 09:36:03 -05:00
Brayan Oliveira
06b586607d nf: Remove SeekBarPreferenceCompat
Unused after its usages were replaced by SliderPreference
2023-06-22 09:14:21 -05:00
Brayan Oliveira
b3f24606dc Replace SeekBarPreference with SliderPreference on Reviewing settings
persistent=false was added to `day_offset_preference` because the value is saved on the collection, which means that it doesn't need to be saved on SharedPreferences
2023-06-22 09:14:21 -05:00
Brayan Oliveira
29dab8aef5 Replace SeekBarPreference with SliderPreference on Control settings 2023-06-22 09:14:21 -05:00
Brayan Oliveira
895c90ff75 Replace SeekBarPreference with SliderPreference on Accessibility settings 2023-06-22 09:14:21 -05:00
Brayan Oliveira
3f82cb2dd0 Replace SeekBarPreference with SliderPreference on Advanced Statistics 2023-06-22 09:14:21 -05:00
Brayan Oliveira
55c007f657 feat: SliderPreference 2023-06-22 09:14:21 -05:00
Brayan Oliveira
3f6d8a6b4b nf: make theme_black parent be theme_dark
so any common properties between the two of them don't have to be duplicated
2023-06-22 09:14:21 -05:00
Brayan Oliveira
e426fd9599 nf: remove com.ichi2.ui.SeekBarPreference
unused
2023-06-22 09:14:21 -05:00