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

15587 Commits

Author SHA1 Message Date
lukstbit
6369461b52 Enable MergeRootFrame lint check as fatal for project 2022-06-05 15:00:35 -05:00
lukstbit
190516ce5e Improve performance for reviewer_*.xml layouts by using the merge tag
The reviewer_flashcard_*.xml layouts all have the same structure with a root FrameLayout and 3 full
screen FrameLayouts corresponding to different areas for the card reviewer screen.

The root layout is only used to set some Relativelayout positioning layout rules in AbstractFlashcardViewe.initLayout()
according to the user's button positioning choice. This root layout could be replaced by a merge tag and the work
done in AbstractFlashcardViewe.initLayout() on it could be replicated to each of its 3 children. This will
improve performance by making the view hierarchy shallower as the 3 children will be added directly to the
reviewer_*.xml layouts.
2022-06-05 15:00:35 -05:00
lukstbit
b55ec892b2 Preemptively suppress MergeRootFrame violation for activity_load_pronounciation.xml
The MergeRootFrame lint check will be enabled in a future commit and it will fail for
this layout if not fixed/suppressed.
2022-06-05 15:00:35 -05:00
Nishant
b639f46518 Replaced String.format in FixedPreferencesTitleLength
Signed-off-by: Nishant <getrooted0019@hotmail.com>
2022-06-05 13:57:36 -05:00
Arthur Milchior
c8a3301c5d NF: remove a useless test
This was useful when tes ran with real time. Anki had a tendency to have
failingy test between 2 and 4 as it did use real time. This is useless and
should not have remained here.
2022-06-05 13:51:53 -05:00
Arthur Milchior
d58cfb4e0c
Mock time clean-up (#11543)
* NF: rename step to mStep

* NF: MockTime has default constructor

the only remaining warnings are related to method adding times that are not
used. But I see no reason not to keep them.
2022-06-05 13:36:24 -05:00
dorrin-sot
bd9b5da934 reviewerCardId if cleanup 2022-06-05 17:13:26 +02:00
dorrin-sot
3d304e82e8 addNoteIntent extra variable 2022-06-05 17:13:26 +02:00
dorrin-sot
a06a3bd809 rescheduleSelectedCards extra variable 2022-06-05 17:13:26 +02:00
dorrin-sot
84e0f5802e onPreview extra variable and previewIntent cleanup 2022-06-05 17:13:26 +02:00
dorrin-sot
26d7810b44 updatePreviewMenuItem 2022-06-05 17:01:40 +02:00
dorrin-sot
3194b922bb onCreateOptionsMenu extra variable and undo null cleanup 2022-06-05 17:01:40 +02:00
dorrin-sot
47ec467937 extra variable in moveSelectedCardsToDeck cleanup 2022-06-05 17:01:40 +02:00
dorrin-sot
7fcc3d1823 mMySearchesDialogListener.onSelection and onRemoveSearch cleanup 2022-06-05 17:01:40 +02:00
Arthur Milchior
4c20bb6567 NF: fromCollection requires nonNull deck
It was only given non null deck, and would crash is given null one, given that
isDynamic uses the deck as a receiver.
2022-06-05 11:54:39 +01:00
Arthur Milchior
3b0076ba43 rot 2022-06-04 21:07:31 -05:00
oyeraghib
5e58c16ff8 cleanup - IDE lint 2022-06-05 03:13:42 +02:00
oyeraghib
1ebbb50593 add scope function for Canvas object 2022-06-05 01:42:40 +02:00
Arthur Milchior
5faff65753 NF: factorize any/removeFirst into removeFirstOrNull 2022-06-04 22:30:15 +02:00
Arthur Milchior
f4dd885a99 Replace spinUtil by semaphores.
Avoid writing method specific code thanks to
standard library
2022-06-04 18:35:34 +01:00
Arthur Milchior
8c243b670d NF: add name to mock
While investigating this class, I had errors. With name, it's easier to debug
2022-06-04 17:47:37 +01:00
Nishant
a8a49695ba Replaced String.format in NoteEditor
Signed-off-by: Nishant <getrooted0019@hotmail.com>
2022-06-04 16:08:54 +02:00
David Allison
461cade5c4 feat: Implement Executor for User Data Migration
An executor allows execution of a list of operations and preemption

Primarily to ensure that the reviewing experience is not delayed
if the scoped storage migration is going on the background.

This allows a single folder to be specified, removing any additional
code complexity in the reviewer, and instead taking it on in the
migration path: via prioritizing a 'reviewer initiated file copy'
2022-06-04 15:57:24 +02:00
Nishant
9478d714e2 Migrate FinderTest to Kotlin
Signed-off-by: Nishant <getrooted0019@hotmail.com>
2022-06-03 23:50:50 +02:00
Nishant
4bef983dbc Rename .java to .kt
Signed-off-by: Nishant <getrooted0019@hotmail.com>
2022-06-03 23:50:50 +02:00
Brayan
44a8dbf18d Extract sync preferences to new category 2022-06-03 14:00:51 -05:00
Brayan
f9e886fe8c Add buildCategorySummary method to Preferences
This aims to allow building categories' summaries flexibly without having to create and retranslate a new string
2022-06-03 14:00:51 -05:00
Brayan
ba0524d165 Add method to require preference by resource Id
this aims to reduce boilerplate of having to add `getString` in many calls of `requirePreference`
2022-06-03 14:00:51 -05:00
lukstbit
505d887711 Remove deprecated LocalBroadcastManager 2022-06-03 14:00:42 -05:00
Mike Hardy
4f00facc28 Bumped version to 2.16alpha67 2022-06-03 17:40:45 +00:00
Mike Hardy
24673bc825
release: allow 80 mins (v 40) for release to run
build is slower with kotlin and we timed out after
doing the release but before parallel builds were propagated - it got close though. Probably will take
50-55 in practice
2022-06-03 12:39:18 -05:00
Mike Hardy
32e9d34692 Bumped version to 2.16alpha66 2022-06-03 16:54:00 +00:00
lukstbit
3a0770eba6 Migrate Tls12SocketFactory.java to .kt 2022-06-03 11:40:10 -05:00
lukstbit
326e215c51 Rename Tls12SocketFactory.java to .kt 2022-06-03 11:40:10 -05:00
AnkiDroid Translations
5ac3f5a520 Updated strings from Crowdin 2022-06-03 11:19:17 -05:00
lukstbit
b0a2bdcdc7 Update androidx.core:core-ktx dependency to 1.8.0 2022-06-03 09:04:51 -05:00
github-actions
6d4551f981 updated mathjax and jquery 2022-06-03 09:00:58 -05:00
dorrin-sot
cd3307aef0
Fix Type Answer Diff for combining marks not showing up (#11374)
* Added Unit Test for #10665
* Some Kotlin Cleanup and a comment
2022-06-03 08:49:21 -05:00
David Allison
0b92cfe815 feat: Introduce AggregateException
Allows multiple exceptions to be handled
2022-06-03 13:07:35 +02:00
Brayan
8efea26e98 Fix deprecations on Preferences.kt
+ cleaned a suppressing which had no use
2022-06-03 11:58:35 +01:00
Brayan
5844ce1178 Fix finish deprecation on Preferences.kt 2022-06-03 11:58:35 +01:00
Mani
29fe0055d5
Update JS library (jquery & mathjax) using GitHub action (#11454)
* update js library (jquery & mathjax)
* restore file mode, change paths in conf.js
* use variable for paths and replacement strings
* check if path exists or not for replacement
2022-06-02 18:28:36 -05:00
Brayan
6d1019e52c Extract debug preferences to developer options
from advanced category
2022-06-02 20:13:25 +02:00
Brayan
b3f5e8e0dd Add developer options category's XML
and related strings
2022-06-02 20:13:25 +02:00
AnkiDroid Translations
ecb177cd9a Updated strings from Crowdin 2022-06-02 10:58:11 -05:00
lukstbit
a61bd6a4d8 Cleanup of var inside Whiteboard 2022-06-02 15:51:26 +01:00
lukstbit
4d106ac7f1 Enable custom color selection for whiteboard 2022-06-01 15:14:33 -05:00
Divyansh Kushwaha
f32bf9914c [Kotlin Cleanup] AnkiStatsTaskHandlerTest 2022-06-01 20:37:07 +01:00
lukstbit
69f6e94e74 Fix whiteboard stroke width button visibility on black themes 2022-06-01 10:31:19 -05:00
lukstbit
8491ebea17 Migrate TextCardExporter.java to kotlin 2022-06-01 10:26:28 -05:00