Fixed a bug causing no database to be open when returning from the deck
picker screen if user presses "back". This caused an exception when
trying to space a rated card.
Tell the loading thread to finish after it has loaded the current deck.
Should speed up the loading of the selected deck, especially if there
are many large decks in the list.
Delegates the loading of the card counts to a separate thread to improve
responsiveness when choosing the deck picker. I'm not sure how locking
for the database works so I implemented a separate locking scheme. With
this, a deck choise will not be acted upon until the counts for all the
decks have been loaded. Should be fairly easy to implement so that the
loader thread will stop loading new decks if one has already been
chosen.
Also fixed an issue about the deck not being loaded again when pressing
the "back" button, causing a force close when trying to space the next
card. It's just a quick fix in Ankidroid.onResume(), not very pretty.
Fixed an issue about the deck not being loaded again when pressing
the "back" button, causing a force close when trying to space the next
card. It's just a quick fix in Ankidroid.onResume(), not very pretty.
Tell the loading thread to finish after it has loaded the current deck.
Should speed up the loading of the selected deck, especially if there
are many large decks in the list.
Delegates the loading of the card counts to a separate thread to improve
responsiveness when choosing the deck picker. I'm not sure how locking
for the database works so I implemented a separate locking scheme. With
this, a deck choise will not be acted upon until the counts for all the
decks have been loaded. Should be fairly easy to implement so that the
loader thread will stop loading new decks if one has already been
chosen.
Also fixed an issue about the deck not being loaded again when pressing
the "back" button, causing a force close when trying to space the next
card. It's just a quick fix in Ankidroid.onResume(), not very pretty.
- The method accept(File) of type DeckPicker.AnkiFilter must override a superclass method
- The method compare(HashMap<String,String>, HashMap<String,String>) of type DeckPicker.HashMapCompare must override a superclass method
I don't understand why, these @override are right in my opinion. Maybe a problem in my environment? I am using compiler compliance level 1.5 on the latest Eclipse, and Java HotSpot 1.6.0_16 on Linux.
- The method accept(File) of type DeckPicker.AnkiFilter must override a superclass method
- The method compare(HashMap<String,String>, HashMap<String,String>) of type DeckPicker.HashMapCompare must override a superclass method
I don't understand why, these @override are right in my opinion. Maybe a problem in my environment? I am using compiler compliance level 1.5 on the latest Eclipse, and Java HotSpot 1.6.0_16 on Linux.
Non-cached version of the counts for new and due cards for each deck
listed in the deck picker. Ported quite a bit of python code from
libanki to make it happen (ie. there are probably bugs).
tagIds() in Deck.java is only declared, but
not implemented since it will not be called from the current code. However
it needs implementation for possible future calls to it.
There can be quite a delay when getting the next card from a big deck.
So I added a simple progress dialog when loading a new deck, so that the
user knows something has happened when he selects a new deck. This
implied creating a new thread to do the loading while the ui thread
shows the dialog.
Redesigned deck picker that gets rid of the filesystem browser. The path
to the folder in which the decks are stored are set in the preferences.
The picker screen then shows a list of all the decks.
Deck.java contains a new class to represent the top level object in the
database, the deck. It is nowhere near finished, but is supposed to
contain the functionality of the Deck class in libanki.
No new data is written to the database. Read data (due cards etc.) is
cached and might be out of date.