Commit Graph

961 Commits

Author SHA1 Message Date
Damien Elmes
a0c1b68b86
Merge pull request #660 from brownbat/tooltip-positioning
Update tooltip() in utils.py
2020-06-08 11:40:43 +10:00
Damien Elmes
fd895c88ca
Merge pull request #659 from BlueGreenMagick/paste-typehint
add type hint to paste-related functions
2020-06-08 11:32:16 +10:00
Damien Elmes
26330da119
Merge pull request #657 from BlueGreenMagick/prof-name
don't allow addons21 as profile name
2020-06-08 11:30:27 +10:00
Damien Elmes
186ccc5f01 pin legacy modules
https://anki.tenderapp.com/discussions/ankidesktop/42248-potentially-serious-image-issue#comment_48388863
2020-06-08 11:12:51 +10:00
Thomas B
26b94e1948 Update tooltip() in utils.py
Allow x,y offsets to be specified for tooltip(), useful for accomodating longer tooltips.
2020-06-07 16:06:23 -04:00
BlueGreenMagick
6cf95d97e7 add type hint to paste-related functions 2020-06-07 12:06:11 +09:00
BlueGreenMagick
7df3c9f0b1 don't allow addons21 as profile name
because addons21 and profiles directory are stored in same directory
2020-06-05 22:44:59 +09:00
Damien Elmes
4a69b55a90 add note/card removal to backend 2020-06-04 18:21:04 +10:00
Damien Elmes
e1b0fe1832 add .count() to hooks, and list->sequence in note deletion 2020-06-04 18:20:03 +10:00
evandrocoan
d566045991 Add missing quotes to typecheck-setup.sh for paths with spaces on
the name.
2020-06-02 21:37:58 -03:00
Damien Elmes
36de3ff6fd more fixes for bundled Qt types 2020-06-03 09:55:30 +10:00
Damien Elmes
08ac2601ed update qt version pin 2020-06-03 09:55:04 +10:00
Damien Elmes
4c6bd7b037 lint fixes 2020-06-02 17:58:14 +10:00
Damien Elmes
59bbf02364 new stubs don't require as many ignores 2020-06-02 17:56:32 +10:00
Damien Elmes
2a52314d58 Switch to PyQt 5.15's (slightly broken) built-in stubs 2020-06-02 17:52:18 +10:00
Damien Elmes
b3752e8618 fix initial login 2020-06-02 15:10:58 +10:00
Damien Elmes
f0b6d13ead save browser columns when changed, not on each browser close 2020-06-02 13:39:15 +10:00
Damien Elmes
4d7e23111e change sync label to indicate sync state
- blue for normal sync, red for full sync required
- refactor status fetching code so we don't hold a collection lock
during the network request, which slows things down
- fix sync spinner restarting when returning to deck list
2020-06-02 13:23:01 +10:00
Damien Elmes
49971d0235 fix media sync progress not updating, and issues closing profile 2020-06-01 13:57:10 +10:00
Damien Elmes
00138c6ba0 make sure browser sidebar refreshes on reset()
if items are modified in a sync, the sidebar needs to reflect it
2020-06-01 13:57:10 +10:00
Damien Elmes
90e19daec2 handle aborting normal sync
- Use a separate abort handle, as the media sync is running
in the background and we need to be able to target them separately.
The current progress handling is going to need a rethink if we introduce
any other background tasks in the future.
- Roll back the transaction when interrupting.
2020-06-01 13:57:10 +10:00
Damien Elmes
c6f0710ce7 report normal sync progress
Also:
- provide a way for the progress handler to skip the throttling so that
we can ensure progress is updated at the end of a stage
- show 'checking' at the end of full sync
2020-06-01 13:57:10 +10:00
Damien Elmes
6bf9f5bc6c lint fixes 2020-06-01 13:57:10 +10:00
Damien Elmes
27a36482c0 unify sync error handling; handle interrupted 2020-06-01 13:57:10 +10:00
Damien Elmes
a8ad4abf37 add "immediate" progress back
on ops which we know are going to take time, it makes the interface
look more responsive to pop up the progress more quickly
2020-06-01 13:57:10 +10:00
Damien Elmes
7e221f0acf update auto-sync code 2020-06-01 13:57:10 +10:00
Damien Elmes
058ff1b71a show server message if present 2020-06-01 13:57:10 +10:00
Damien Elmes
87ca8e39a8 progress bar tweaks 2020-06-01 13:57:10 +10:00
Damien Elmes
0e5b7da62a login/full up/full down plugged in 2020-06-01 13:57:10 +10:00
Damien Elmes
ee6d7f82e7 rework progress handling
- client now polls status instead of backend pushing it
- supports multiple threads
- update throttling happens in one place
2020-06-01 13:57:10 +10:00
Damien Elmes
b254b1f722 another snapshot of sync work
progress handler is going to need to be reworked to function across
threads
2020-06-01 13:57:10 +10:00
Damien Elmes
8516ed8655 handle images served from directory + svg content type
https://anki.tenderapp.com/discussions/ankidesktop/41974-win-linux-when-pasting-some-html-i-get-error-in-_run_command-ankirsbackendioerror-ioerror
2020-06-01 13:40:17 +10:00
Damien Elmes
caf95742da handle unicode hostnames
https://anki.tenderapp.com/discussions/ankidesktop/41915-something-wrong-and-i-cant-start-anki
2020-06-01 13:40:17 +10:00
evandrocoan
5bec874a7b Set to also print the correct QT log message category 2020-05-31 19:38:02 -03:00
evandrocoan
25ff525cc9 Print qt context if it exists
https://stackoverflow.com/questions/42561295/qt-error-is-printed-on-the-console-how-to-see-where-it-originates-from
https://stackoverflow.com/questions/35894171/redirect-qdebug-output-to-file-with-pyqt5
https://anki.tenderapp.com/discussions/ankidesktop/42070-anki-closes-without-warning-when-importing-conflicting-shared-deck
https://doc.qt.io/qt-5/qtglobal.html#qInstallMessageHandler
2020-05-31 19:38:02 -03:00
Damien Elmes
9594a3ef9b add some more names to about.py
If you've contributed and are missing from the list, please send me
a PR!
2020-06-01 06:27:14 +10:00
Damien Elmes
268edc237a
Merge pull request #645 from evandroforks/resize_clayout_editor_and_preview
Allow to resize clayout.py horizontal space between the text editor and the card preview
2020-06-01 05:53:40 +10:00
evandrocoan
9257e75762 Save and restore the debug console window geometry and splitter 2020-05-30 20:58:55 -03:00
evandrocoan
6bd80fef67 Add saveSplitter and restoreSplitter to clayout.py
# Conflicts:
#	qt/aqt/clayout.py
2020-05-30 20:33:57 -03:00
evandrocoan
a5fd8398c4 Allow to resize clayout.py horizontal space between the text editor
and the card preview.

# Conflicts:
#	qt/aqt/clayout.py
2020-05-30 20:33:10 -03:00
Damien Elmes
cfc2a549f1
Merge pull request #641 from glutanimate/add-main-window-did-init-hook
Add main_window_did_init hook
2020-05-29 08:56:47 +10:00
Damien Elmes
36bc50d65f
Merge pull request #640 from evandroforks/fix_render_card_being_called_twice
Fixed previewer.py::render_card() being called twice in row
2020-05-29 08:48:35 +10:00
Damien Elmes
255ac3679b add maximize button to HTML editor
closes ankitects/help-wanted#1
2020-05-29 08:43:33 +10:00
Damien Elmes
f3a8bb28d5 fix progress window not disappearing when importing csv 2020-05-29 08:40:25 +10:00
Glutanimate
6147356330 Add main_window_did_init hook and clarify difference to profile_did_open 2020-05-28 13:30:22 +02:00
evandrocoan
f78166cda2 Fixed previewer.py::render_card() being called twice in row
Related to: https://github.com/ankitects/anki/pull 529
Ensuring "setNote" is called only once during changing of note type

After debugging the code, every time the cards changes, there are
two stacktraces generated and triggered when note cards change:

calling 1590591251.4621403
   File "qt/runanki", line 4, in <module>
  File "F:\anki\qt\aqt\__init__.py", line 365, in run
    _run()
  File "F:\anki\qt\aqt\__init__.py", line 515, in _run
    app.exec()
  File "F:\anki\qt\aqt\webview.py", line 467, in handler
    cb(val)
  File "F:\anki\qt\aqt\editor.py", line 477, in <lambda>
    self.web.evalWithCallback("saveNow(%d)" % keepFocus, lambda res: callback())
  File "F:\anki\qt\aqt\browser.py", line 858, in <lambda>
    self.editor.saveNow(lambda: self._onRowChanged(current, previous))
  File "F:\anki\qt\aqt\browser.py", line 880, in _onRowChanged
    self._renderPreview(True)
  File "F:\anki\qt\aqt\browser.py", line 1576, in _renderPreview
    self._previewer.render_card(cardChanged)
  File "F:\anki\qt\aqt\previewer.py", line 136, in render_card
    print('calling', time.time(), "\n", "".join( traceback.format_stack() ) )

calling 1590591251.4766161
   File "qt/runanki", line 4, in <module>
  File "F:\anki\qt\aqt\__init__.py", line 365, in run
    _run()
  File "F:\anki\qt\aqt\__init__.py", line 515, in _run
    app.exec()
  File "F:\anki\qt\aqt\webview.py", line 467, in handler
    cb(val)
  File "F:\anki\qt\aqt\editor.py", line 453, in oncallback
    gui_hooks.editor_did_load_note(self)
  File "F:\anki\qt\aqt\gui_hooks.py", line 1168, in __call__
    hook(editor)
  File "F:\anki\qt\aqt\browser.py", line 887, in onLoadNote
    self.refreshCurrentCard(editor.note)
  File "F:\anki\qt\aqt\browser.py", line 884, in refreshCurrentCard
    self._renderPreview(False)
  File "F:\anki\qt\aqt\browser.py", line 1576, in _renderPreview
    self._previewer.render_card(cardChanged)
  File "F:\anki\qt\aqt\previewer.py", line 136, in render_card
    print('calling', time.time(), "\n", "".join( traceback.format_stack() ) )
2020-05-27 14:41:07 -03:00
sandersantema
8f993c8e31 remove unused variable 'w' from '_onHtmlEdit' 2020-05-27 12:04:49 +02:00
sandersantema
3407fb7b2b add saveGeom and restoreGeom to htmlEditor 2020-05-27 12:04:00 +02:00
Damien Elmes
835d1eb994
Merge pull request #637 from BlueGreenMagick/field-drag-drop-fix
fix drag drop field repositioning
2020-05-27 10:24:07 +10:00
Damien Elmes
4c89d0cc5e
Merge pull request #636 from BlueGreenMagick/typing-contextmenuevent
add evt type for contextMenuEvent method
2020-05-27 10:23:44 +10:00
Damien Elmes
7ef884d3b9
Merge pull request #635 from BlueGreenMagick/typing
add typehint for eventFilter method
2020-05-27 10:23:28 +10:00
Damien Elmes
d04699ad06 try mpv on Windows again
https://github.com/ankitects/anki/pull/621
2020-05-27 09:21:41 +10:00
Damien Elmes
c37390ae14 apply mpv fix
c0d9544812
2020-05-27 09:19:20 +10:00
Damien Elmes
97618564f4 fix typechecking breaking with latest mypy_protobuf
the change that caused it:
https://github.com/dropbox/mypy-protobuf/issues/118

This is more awkward to handle now, as the types are only available
at type-checking time. Python's static typing is such a mess :-(
2020-05-27 09:14:02 +10:00
BlueGreenMagick
ce512014f2 do nothing if dropPos == idx
since such move won't change the field position
and when trying to move the field below itself
may lead to it being moved below the next field
2020-05-26 18:59:53 +09:00
BlueGreenMagick
6f3ebafc46 fix drag drop field repositioning 2020-05-26 18:27:38 +09:00
BlueGreenMagick
8f4469d5e9 add evt type for contextMenuEvent method 2020-05-26 17:12:39 +09:00
BlueGreenMagick
99663be358 add typehint for eventFilter method 2020-05-26 17:08:55 +09:00
Damien Elmes
f9f07a7d55 allow hook to modify search text 2020-05-25 16:54:57 +10:00
Damien Elmes
6b05272ed4
Merge pull request #633 from hgiesel/dconf_hooks
Add three deck config hooks
2020-05-24 09:53:22 +10:00
Damien Elmes
38508c3ad7 use keyword args for calls with more than one argument 2020-05-24 09:12:47 +10:00
Damien Elmes
89dde3aeb0 migrate the remaining methods 2020-05-24 08:36:50 +10:00
Henrik Giesel
788a3eeced Satisfy black reformatter 2020-05-23 11:14:52 +02:00
Damien Elmes
081a61a438 more methods 2020-05-23 14:01:36 +10:00
Henrik Giesel
2074ffcf51 Add three deck config hooks
- gui_hooks.deck_conf_did_add_config
- gui_hooks.deck_conf_will_remove_config
- gui_hooks.deck_conf_will_rename_config
2020-05-22 21:24:05 +02:00
Damien Elmes
175afa9fee migrate more methods to service 2020-05-22 22:09:33 +10:00
Damien Elmes
58a243aa6c EMPTY_CARDS should not be translatable 2020-05-22 11:45:14 +10:00
Damien Elmes
6144317736 hook expected an int, not a str 2020-05-22 11:27:40 +10:00
Damien Elmes
cecf363c38 fix custom study not saving 2020-05-22 11:25:11 +10:00
Damien Elmes
0bf4fe400a fix deletion of decks; allow deleting cards from default
https://anki.tenderapp.com/discussions/beta-testing/1967-2126-189-g7384df8f-crash-at-note-types-fields-save#comment_48353232
2020-05-22 11:24:56 +10:00
Damien Elmes
9baa8530d5 move deck/notetype update hooks to gui
We need to migrate away from firing hooks in libanki, since libanki
methods may be running on a background thread, and hook consumers
typically expect the code to run in the main thread. We could document
it, but it would frequently be forgotten about, and could lead to
crashes.

https://anki.tenderapp.com/discussions/ankidesktop/41748-qobject-cannot-create-children-for-a-parent-that-is-in-a-different-thread-when-hitting-the-save-button-on-clayoutpy-window
2020-05-22 10:47:14 +10:00
Damien Elmes
16eceb5260 show 'changes saved' in parent window 2020-05-22 10:43:41 +10:00
Damien Elmes
9358c78bad show message when search fails 2020-05-22 10:43:28 +10:00
Damien Elmes
a4efd9910e monospace font in clayout 2020-05-22 09:58:20 +10:00
Damien Elmes
a3ac96443b use context manager in retrieveURL 2020-05-21 10:58:42 +10:00
Damien Elmes
d5d5ca9c3d clearer variable names in retrieveURL 2020-05-21 09:22:34 +10:00
Damien Elmes
8300d8d85c
Merge pull request #630 from evandroforks/close_http_client_connections
Fixed HttpClient session not being closed
2020-05-21 09:17:07 +10:00
evandrocoan
14692fb345 Added missing Anki icon to debug window 2020-05-20 19:21:31 -03:00
evandrocoan
b388c43454 Fixed HttpClient session not being closed 2020-05-20 19:20:41 -03:00
Damien Elmes
300fba156e fix shortcut keys in clayout 2020-05-21 07:51:35 +10:00
Damien Elmes
12b9a7e368 left-align radio buttons in clayout 2020-05-20 19:56:53 +10:00
Damien Elmes
e2bb5cd14a update missed storage._Collection references 2020-05-20 19:45:46 +10:00
Damien Elmes
50fdf9b03d storage->collection 2020-05-20 17:58:28 +10:00
Damien Elmes
c49c378296 move storage logic into collection.py; fix export bug
https://anki.tenderapp.com/discussions/ankidesktop/41495-using-file-export-closes-the-collection-on-mwcoldb-if-the-browser-window-is-open
2020-05-20 17:43:34 +10:00
Damien Elmes
eb0c9f6e0a fix progress bar getting stuck on image paste 2020-05-20 16:12:41 +10:00
Damien Elmes
6ae55a7a77 deprecate removeTempNote() 2020-05-20 15:01:05 +10:00
Damien Elmes
8da69c5d39 fix HTML editor in add screen 2020-05-20 14:59:22 +10:00
Damien Elmes
8f207cc900 drop mw.weakref usage in models.py for now
https://anki.tenderapp.com/discussions/beta-testing/1967-2126-189-g7384df8f-crash-at-note-types-fields-save
2020-05-20 13:53:34 +10:00
Damien Elmes
4fd8a4cf2d update empty cards hook
Closes #515
2020-05-20 13:41:09 +10:00
Damien Elmes
9876c30d89 tidy up Qt import 2020-05-20 13:38:55 +10:00
Damien Elmes
e564a47504
Merge pull request #625 from evandroforks/fixed_check_box_called_twice
Fixed clayout.py rendering the contents twice when clicked
2020-05-20 12:48:48 +10:00
Damien Elmes
1d4fd50d8b
Merge pull request #626 from evandroforks/fix_previewer_button
Fixed previewer button not resetting the state when the preview
2020-05-20 12:48:17 +10:00
evandrocoan
64a90a457c Fixed clayout.py rendering the contents twice when clicked
https://stackoverflow.com/questions/36808257/pyqt-radiobutton-ischecked-is-executed-twice
2020-05-19 20:17:20 -03:00
evandrocoan
3ea6f685b2 Added missing Anki icon to qt/aqt/previewer.py 2020-05-19 19:43:18 -03:00
evandrocoan
3dcfd57b07 Fixed previewer button not resetting the state when the preview
window is closed by its X button
2020-05-19 19:24:54 -03:00
evandrocoan
200bad3714 Explicitly close the importer file descriptor
https://github.com/ankitects/anki/pull 613
2020-05-18 15:54:20 -03:00
evandrocoan
efb62b9528 Add missing close file descriptors using context managers 2020-05-18 15:54:20 -03:00
Damien Elmes
31ceb5d730 simplify the migration popup
Avoid presenting the user with a wall of text they may not understand,
default to proceeding, and quit if the user cancels.
2020-05-18 20:15:59 +10:00
Damien Elmes
a53aac40f8
Merge pull request #610 from evandroforks/ask_confirmation_before_moving_anki_collection
Ask user confirmation before moving the Anki directory
2020-05-18 19:44:27 +10:00
Damien Elmes
e323a8f902
Merge pull request #619 from evandroforks/fix_empty_sound_tags
Also fix legacy.py::anki.sound._soundReg accepting empty tags
2020-05-18 19:31:22 +10:00
Damien Elmes
fe196bc1df
Merge pull request #620 from evandroforks/remove_unused_var
Remove unused t = time.time() variable on qt/aqt/browser.py
2020-05-18 19:20:08 +10:00
Damien Elmes
1fc951471c fix python3.7 lint issue 2020-05-18 18:08:57 +10:00
Damien Elmes
8bd5d756e2 bump version 2020-05-18 12:50:20 +10:00
Damien Elmes
252eb3a444 fix shared deck conf warning 2020-05-17 14:37:59 +10:00
Damien Elmes
8b57a61746 use deck tree for new/review count calculation
- wins back the performance lost by the decks and dconf not being
in memory, and the overhead of serializing data for DB calls
- card counts are no longer capped to 1000
- learn counts are currently still calculated separately - can't merge
v1 counts without changing the existing behaviour
- partially rendering the tree may yield more savings
2020-05-16 20:28:03 +10:00
Damien Elmes
8eada2b57d add find_deck_in_tree() 2020-05-16 13:05:20 +10:00
Damien Elmes
578b60c104 save profile stats to file instead of generating report
Can use an external tool like snakeviz to query them after a run.
2020-05-16 12:53:01 +10:00
Damien Elmes
f6767d1cff fix lint issues 2020-05-16 12:20:20 +10:00
Damien Elmes
0c340eba64 fix+speed up deck list from Filters button
I don't think it makes much sense to keep these lists that largely
duplicate the sidebar functionality, but they remain for now.
2020-05-16 11:54:08 +10:00
Damien Elmes
f2086fc2e3 switch to new deck tree in deck browser
Saves us having to look up collapsed/filtered as we render, and gives
us type completion.
2020-05-16 10:52:14 +10:00
Damien Elmes
75d3eebafe drop usage of nameMap in deckbrowser
It was unnecessary, and being called multiple times as we recursed
downwards, slowing things down.
2020-05-16 10:02:08 +10:00
Damien Elmes
83adfb60cf avoid duplicate reset in overview 2020-05-15 21:54:56 +10:00
Damien Elmes
964a69e54e handle default deck and filtered deck suppression in the backend 2020-05-15 21:21:10 +10:00
Damien Elmes
2ac33500eb fetch stock notetypes from backend 2020-05-15 17:08:24 +10:00
Damien Elmes
f650e5557f add back card deletion count
cheaper to look up now that there's an index on notes.mid
2020-05-15 15:28:07 +10:00
Damien Elmes
00db72e365 show (Deck) when card hasn't been added 2020-05-15 15:01:28 +10:00
Damien Elmes
ed52a4dc3f when previewing cards, use the default deck for now
Replay code needs to be able to retrieve deck options. We should
probably use the current deck or pass it in in the future.
2020-05-15 14:50:57 +10:00
Damien Elmes
68e1303880 update replay suppression in clayout 2020-05-15 14:26:00 +10:00
Damien Elmes
46c363d4aa track changes in fields dialog as well
And avoid bumping schema until user actually saves, but warn at
start.
2020-05-15 13:59:44 +10:00
Damien Elmes
f1c5c88c10 no longer need to check addNote's return value 2020-05-14 21:59:42 +10:00
Damien Elmes
24ffb6ab76 check for empty cloze cards when rendering as well 2020-05-14 21:56:45 +10:00
Damien Elmes
782911471b add "fill empty" checkbox 2020-05-14 20:58:45 +10:00
Damien Elmes
9a222e620a update Add Field button 2020-05-14 18:01:15 +10:00
Damien Elmes
c5d574e9f4 use group box instead of tabs in card layout screen 2020-05-14 17:26:40 +10:00
Damien Elmes
5167bb57be start reworking card layout screen
- front/back/css shown in tabs
- front/back preview switchable; only one webview needs to be loaded
- dropdown to select cloze number in preview
- search box to search in front/back/css
2020-05-14 15:24:29 +10:00
Damien Elmes
f23eb350e4 drop availOrds(), and use backend for getting cloze numbers 2020-05-14 12:14:00 +10:00
Damien Elmes
c601dcef24 remove obsolete preview code 2020-05-14 09:22:53 +10:00
Damien Elmes
6680cdf1d3 update the card layout screen
- changes are now committed in bulk when closing the dialog,
and can be canceled
- it's not necessary to save the note to the database to preview it
- duplicate fields are now shown as duplicates in the top list
- redraw preview more quickly
- use + instead of _ when deduplicating names, as the latter is a
glob character
2020-05-13 17:24:49 +10:00
Damien Elmes
12b8fe6147 don't hide static template text when card is empty 2020-05-13 11:17:44 +10:00
evandrocoan
3f517c71e4 Remove unused t = time.time() variable on qt/aqt/browser.py 2020-05-12 15:09:22 -03:00
evandrocoan
f8c6300e27 Also fix legacy.py::anki.sound._soundReg accepting empty tags 2020-05-12 12:43:35 -03:00
Damien Elmes
9317cee9ba handle scheduling preferences in the backend 2020-05-12 21:13:34 +10:00
Damien Elmes
70cc1699a6 rewrite DB check
- notes with wrong field count are now recovered instead of
being deleted
- notes with missing note types are now recovered
- notes with missing cards are now recovered
- recover_missing_deck() still needs implementing
- checks required
2020-05-12 21:13:34 +10:00
Damien Elmes
2413f286b1 bulk tag add/remove/update; canonify on note save
also remove the tag list updated hook - we'll need a better solution in
the future than having the library code call back into the GUI code
2020-05-12 21:13:34 +10:00
Damien Elmes
7bab99d873 support disabling unicode normalization in notes 2020-05-12 21:13:34 +10:00
Damien Elmes
05ca797ee6 add pep8 name for findReplace 2020-05-12 21:13:34 +10:00
Damien Elmes
29379a9a50 update extract-po-string to handle plurals again 2020-05-12 21:13:34 +10:00
Damien Elmes
1852e32183 update find&replace in browser
sadly the UI still stutters on large selections - the calls
to get the selected rows from Qt are really slow.
2020-05-12 21:13:34 +10:00
Damien Elmes
c51ca666c3 catch schema mod in background
If the schema confirmation dialog is shown on a background thread it
will crash the app, so we convert this to an assertion error that gets
caught by the error handler. Code still needs to be updated to modify
the schema prior to moving to the background, but at least this way
it doesn't crash.
2020-05-12 21:13:34 +10:00
Damien Elmes
6e6d9ee1a3 check untyped in clayout 2020-05-12 21:13:34 +10:00
Damien Elmes
9f585d4d38 remove an unused import 2020-05-12 21:13:34 +10:00
Damien Elmes
25f122bf5c update fields and models diags
- field changes are now applied when user closes dialog with save
button, in bulk
- models diag now fetches note type and saves it as required, instead
of holding on top a copy that can grow stale as changes are made in
subdialogs
- both dialogs now perform operations in the backend
- note.model() now fetches the note type on the fly, instead of
holding on to a copy that may become stale
2020-05-12 21:13:34 +10:00
Damien Elmes
f6931197d2 add helper to run background task with progress 2020-05-12 21:13:34 +10:00
Damien Elmes
36c1d1cf8c reuse existing use count in note types screen 2020-05-12 21:13:33 +10:00
Damien Elmes
ce104d16a3 mypy/isort fixes 2020-05-12 21:13:33 +10:00
Damien Elmes
238441f2d9 use the backend for the deck due tree
- approx 3x faster on a large test deck
- counts are no longer capped to 1000 in the tree
2020-05-12 21:13:33 +10:00
Damien Elmes
67421e02ec add browserCollapsed as part of tree build 2020-05-12 21:13:33 +10:00
Damien Elmes
a0160d7f1e fix mypy issues 2020-05-12 21:13:33 +10:00
Damien Elmes
a88bc1e836 speed up browser load by rendering deck tree in Rust and skipping counts 2020-05-12 21:13:33 +10:00
Damien Elmes
0bb80329e8 ensure collection doesn't get stuck open if loading fails 2020-05-12 21:13:33 +10:00