David Allison
4e755d077f
rename: Sound.kt -> SoundKt.kt
...
'Sound.kt' blocks conversion of Sound.java to Kotlin
2022-08-19 19:54:55 -05:00
oakkitten
b63d815746
Fix Full screen navigation drawer overtaking child view gestures
...
The option Full screen navigation drawer allows opening the navigation
drawer by swiping right anywhere on the screen. It has an issue in that
it will intercept all rightwards swipes, even if a view inside it also
wants these events. This fixes it.
Closes #11588 .
2022-08-19 19:54:07 -05:00
Arthur Milchior
003092c7e9
NF: factorize onOptionsItemSelected
2022-08-19 15:50:30 -03:00
Arthur Milchior
3144b9c903
NF: factorize onKeyDown
2022-08-19 15:50:30 -03:00
Arthur Milchior
f90d7a2259
NF: rename closeDeckOptions to closeWithResult to factorize
2022-08-19 15:50:30 -03:00
Brayan Oliveira
3daabeeba7
Replace toasts for snackbars on preferences
2022-08-19 19:20:05 +03:00
Brayan Oliveira
e1ba8736ea
Add extension function for creating snackbars from fragments
2022-08-19 19:20:05 +03:00
David Allison
8cfc39b850
lint: fix IDE Lint
...
Handle 'KotlinCleanup'
2022-08-19 07:19:09 -05:00
David Allison
0020421dbc
deps: Remove 'java' from lint-rules
...
No Java files exist in lint-rules so we no longer need this
2022-08-19 07:19:09 -05:00
Mike Hardy
7ef8cf00ad
Bumped version to 2.16alpha79
2022-08-19 03:27:29 +00:00
Brayan Oliveira
a6d97db009
Replace FragmentLayout with FragmentContainerView as the container for fragments
...
It's now Android's preferred container for fragments (https://developer.android.com/jetpack/androidx/releases/fragment#version_120_3 )
And as it extends FrameLayout, there shouldn't be a problem
2022-08-18 22:24:04 -05:00
Arthur Milchior
e6f4a00986
NF: remove unchecked cast when possible
...
This can be done simply by reifying types, which itself requires inlining the
function.
This can't be done when the uncheckd is due to the fact that we cast to a type
with type parameters, for recursive function, and when the function has state effect.
2022-08-18 21:59:37 -05:00
David Allison
ab84324548
refactor: Convert InconsistentAnnotationUsageTest to Kotlin
...
com.ichi2.anki.lint.rules.InconsistentAnnotationUsageTest
2022-08-18 21:52:12 -05:00
David Allison
2947fd91a5
refactor: Rename InconsistentAnnotationUsageTest.java to .kt
...
com.ichi2.anki.lint.rules.InconsistentAnnotationUsageTest
2022-08-18 21:52:12 -05:00
David Allison
2aebc86a51
refactor: Convert JavaConstantFieldDetectorTest to Kotlin
...
com.ichi2.anki.lint.rules.JavaConstantFieldDetectorTest
2022-08-18 21:50:42 -05:00
David Allison
98964081e0
refactor: Rename JavaConstantFieldDetectorTest.java to .kt
...
com.ichi2.anki.lint.rules.JavaConstantFieldDetectorTest
2022-08-18 21:50:42 -05:00
David Allison
57fefb71ec
refactor: Convert JavaNonPublicNonStaticFieldDetectorTest to Kotlin
...
com.ichi2.anki.lint.rules.JavaNonPublicNonStaticFieldDetectorTest
2022-08-18 21:49:05 -05:00
David Allison
cae34cbfaa
refactor: Rename JavaNonPublicNonStaticFieldDetectorTest.java to .kt
...
com.ichi2.anki.lint.rules.JavaNonPublicNonStaticFieldDetectorTest
2022-08-18 21:49:05 -05:00
David Allison
7eedb3fff3
refactor: Convert PreferIsEmptyOverSizeCheckTest to Kotlin
...
com.ichi2.anki.lint.rules.PreferIsEmptyOverSizeCheckTest
2022-08-18 21:47:29 -05:00
David Allison
d15f54d02b
refactor: Rename PreferIsEmptyOverSizeCheckTest.java to .kt
...
com.ichi2.anki.lint.rules.PreferIsEmptyOverSizeCheckTest
2022-08-18 21:47:29 -05:00
David Allison
dce6f40ced
refactor: Convert PrintStackTraceUsageTest to Kotlin
...
com.ichi2.anki.lint.rules.PrintStackTraceUsageTest
2022-08-18 21:46:23 -05:00
David Allison
b8f373eba7
refactor: Rename PrintStackTraceUsageTest.java to .kt
...
com.ichi2.anki.lint.rules.PrintStackTraceUsageTest
2022-08-18 21:46:23 -05:00
David Allison
8ce99c0e2b
refactor: Kotlin - fix nullability
...
This is before converting 'Utils.java'
**Collection:**
* setUserFlag
* genCards
* cardCount
* emptyCardReport
* updateFieldCache
**BaseSched:**
* remFromDyn
**Anki2Importer:**
* _writeDstMedia
2022-08-18 21:44:09 -05:00
David Allison
14cdd72f34
refactor: Convert NotificationChannelTest to Kotlin
...
com.ichi2.anki.tests.NotificationChannelTest
Required 'kotlin-test' for a correct 'assertNotNull'
2022-08-18 21:33:27 -05:00
David Allison
15a1710e5f
refactor: Rename NotificationChannelTest.java to .kt
...
com.ichi2.anki.tests.NotificationChannelTest
2022-08-18 21:33:27 -05:00
lukstbit
ca6fa20292
Delete unused/empty BasicMediaClipFieldControllerTest
2022-08-18 20:47:25 -05:00
Arthur Milchior
599bcebfb0
NF: Conversion to nullable, then non null simplified
2022-08-18 20:14:12 -05:00
David Allison
7c64786676
refactor: Convert RetryRule to Kotlin
...
com.ichi2.anki.tests.libanki.RetryRule
2022-08-18 19:26:17 -05:00
David Allison
04746739d7
refactor: Rename RetryRule.java to .kt
...
com.ichi2.anki.tests.libanki.RetryRule
2022-08-18 19:26:17 -05:00
Nishant
7b1779852c
Removed getLastListElement and tests
2022-08-18 19:11:48 -05:00
MrPenguins
7673c410ce
Fixed the bug that filtered/custom study decks don't show in the Card browser
2022-08-18 18:38:35 -05:00
Mohd Raghib
e0ff9d3533
[KotlinCleanup] CardBrowser ( #11457 )
...
* cleanup - use `?.`
* cleanup - IDE lint
* cleanup - use `isNotEmpty`
* cleanup - if -> when
2022-08-18 18:38:14 -05:00
Arthur Milchior
21196d1389
NF: factorize unmondReceiver creation
2022-08-18 18:22:02 -05:00
Nishant Bhandari
670b0fdd98
[Enhancement] Matched the color of statusbar to actionbar & navbar to background. ( #11236 )
...
* Set statusbar color in theme_black.xml
* Set statusbar & navbar color in theme_dark.xml
* Set statusbar & navbar color in light & plain theme
* Setting navbar color programmatically.
* Setting statusbar color same as actionbar.
Co-authored-by: Mike Hardy <github@mikehardy.net>
2022-08-18 16:48:35 -05:00
Jaivardhan Shukla
c3b95c65fb
Added custom layout to the spinner adapter in the card browser activity to prevent the overlapping of various interactive components on the screen ( #10968 )
...
* Create spinner_custom_layout.xml
* Update styles.xml
* Update CardBrowser.kt
Co-authored-by: Mike Hardy <github@mikehardy.net>
2022-08-18 16:42:52 -05:00
lukstbit
6cdeee1cb7
Fix onActivityResult deprecation for StudyOptionsActivity
2022-08-18 16:26:23 -05:00
Akshit Sinha
a2eef40136
Modify findNotes()
to use V16 searchNotes()
function ( #11908 )
...
* Add `findNotes` function in `CollectionV16` new backend's searchNotes
Modify SearchNotes to be able to use both legacy and V16 functions
change ordering key for notes, and use JvmOverloads instead of overriding
* Fix config key, make query non-null
2022-08-18 16:17:08 -05:00
David Allison
2942f7f6ec
refactor: Convert StdModels to Kotlin
...
com.ichi2.libanki.StdModels
2022-08-18 16:06:12 -05:00
David Allison
b57f1dd32c
refactor: Rename StdModels.java to .kt
...
com.ichi2.libanki.StdModels
2022-08-18 16:06:12 -05:00
David Allison
9fa8b0235f
refactor: Convert MathFunctionAtom to Kotlin
...
com.wildplot.android.parsing.AtomTypes.MathFunctionAtom
2022-08-18 15:59:00 -05:00
David Allison
68ff486934
refactor: Rename MathFunctionAtom.java to .kt
...
com.wildplot.android.parsing.AtomTypes.MathFunctionAtom
2022-08-18 15:59:00 -05:00
David Allison
0e7f001bfb
perf: testAnswerCard - waiting on thread
...
`wait` uses Object.wait, we wanted `Thread.join()
2022-08-18 15:53:26 -05:00
lukstbit
9fc2d1c263
Fix save search in CardBrowser when dialog has no list
2022-08-18 15:51:27 -05:00
David Allison
396f5341fd
refactor: Convert DeckConfig to Kotlin
...
com.ichi2.libanki.DeckConfig
2022-08-18 15:46:32 -05:00
David Allison
983086e903
refactor: Rename DeckConfig.java to .kt
...
com.ichi2.libanki.DeckConfig
2022-08-18 15:46:32 -05:00
oyeraghib
b13f03b191
cleanup: replace TextUtils for checking empty or null
...
removed the `Kotlin Cleanup` here even though TextUtils import is still present in the file because it is needed for the use case of `TextUtils.TruncateAt.END`
2022-08-18 15:42:00 -05:00
David Allison
e230b5cd64
refactor: Convert DBTest to Kotlin
...
com.ichi2.anki.tests.libanki.DBTest
2022-08-18 15:37:42 -05:00
David Allison
1767ed44a9
refactor: Rename DBTest.java to .kt
...
com.ichi2.anki.tests.libanki.DBTest
2022-08-18 15:37:42 -05:00
Brayan Oliveira
9ad1f5d940
Optimize NumberRangePref call change
...
Reduce the cost of converting its value from a string to Int and vice-versa
This is done by calling `callChangeListener` manually. Previously, it was called on `super.OnDialogClosed()`, which passed the value as a string
2022-08-18 15:37:12 -05:00
Brayan Oliveira
e9678d742f
Fix crash if NumberRangePref value is empty on close
2022-08-18 15:37:12 -05:00