diff --git a/TODO.internal b/TODO.internal deleted file mode 100644 index ef5deb16f..000000000 --- a/TODO.internal +++ /dev/null @@ -1 +0,0 @@ -* replace HtmlToString by android.text.Html diff --git a/TODO.library b/TODO.library index c9d5827c4..7ba5dde8a 100644 --- a/TODO.library +++ b/TODO.library @@ -1,16 +1,11 @@ -0.99: -DONE Reload book info from file -DONE don't run several initialization threads in the same time -DONE lib.ololo.cc - After 0.99: -* returning from footnotes (ask if footnote is in the same model and there was page scrolling) +DONE returning from footnotes (ask if footnote is in the same model and there was page scrolling) * prevent from sleep if battery is in charging mode * Open the help file if the current book is deleted from library -* Partial loading from database +DONE Partial loading from database * Database updating in backgorund * Watch filesystem after loading -* Show wait message during search +DONE Show wait message during search * Reload book info for all the files * garbage in Boris Akunin, Сказки для идиотов diff --git a/TODO.network b/TODO.network index 57066afed..f54d7f9b2 100644 --- a/TODO.network +++ b/TODO.network @@ -1,5 +1,4 @@ * 'sign out' feature for basic-auth -* SSLCertificate processing DONE show 'empty basket' message without opening of catalog * update basket view if basket content is changed @@ -14,14 +13,14 @@ DONE show recommendation item if basket is not empty * separate search for each catalog (if search URL is presented) * menu search button should be available for all catalog levels -* float point numbers as series index -* replace AuthenticationCatalog by AuthenticationActivity +DONE float point numbers as series index +DONE replace AuthenticationCatalog by AuthenticationActivity * 'recently visited catalogs' item * load search URL for catalogs from these catalogs, not from our generic file DONE show library name in network book activity -* litres: credit card top up -* litres: terminal (?) top up +DONE litres: credit card top up +* litres: self-service kiosk top up DONE litres: similar books link ------------------------------ diff --git a/src/org/geometerplus/android/fbreader/library/LibraryActivity.java b/src/org/geometerplus/android/fbreader/library/LibraryActivity.java index 80399f630..c638642af 100644 --- a/src/org/geometerplus/android/fbreader/library/LibraryActivity.java +++ b/src/org/geometerplus/android/fbreader/library/LibraryActivity.java @@ -128,9 +128,9 @@ public class LibraryActivity extends BaseActivity implements MenuItem.OnMenuItem @Override protected void onActivityResult(int requestCode, int returnCode, Intent intent) { if (requestCode == BOOK_INFO_REQUEST) { - final String path = intent.getStringExtra(BookInfoActivity.CURRENT_BOOK_PATH_KEY); - final Book book = Book.getByFile(ZLFile.createFileByPath(path)); - myLibrary.refreshBookInfo(book); + //final String path = intent.getStringExtra(BookInfoActivity.CURRENT_BOOK_PATH_KEY); + //final Book book = Book.getByFile(ZLFile.createFileByPath(path)); + //myLibrary.refreshBookInfo(book); getListView().invalidateViews(); } else { super.onActivityResult(requestCode, returnCode, intent); diff --git a/src/org/geometerplus/fbreader/network/NetworkLibrary.java b/src/org/geometerplus/fbreader/network/NetworkLibrary.java index f25a95546..14201d9e5 100644 --- a/src/org/geometerplus/fbreader/network/NetworkLibrary.java +++ b/src/org/geometerplus/fbreader/network/NetworkLibrary.java @@ -63,8 +63,10 @@ public class NetworkLibrary { public List languageCodes() { final TreeSet languageSet = new TreeSet(); - for (INetworkLink link : myLinks) { - languageSet.add(link.getLanguage()); + synchronized (myLinks) { + for (INetworkLink link : myLinks) { + languageSet.add(link.getLanguage()); + } } return new ArrayList(languageSet); } @@ -112,10 +114,12 @@ public class NetworkLibrary { private List activeLinks() { final LinkedList filteredList = new LinkedList(); final Collection codes = activeLanguageCodes(); - for (INetworkLink link : myLinks) { - if (link instanceof ICustomNetworkLink || - codes.contains(link.getLanguage())) { - filteredList.add(link); + synchronized (myLinks) { + for (INetworkLink link : myLinks) { + if (link instanceof ICustomNetworkLink || + codes.contains(link.getLanguage())) { + filteredList.add(link); + } } } return filteredList; @@ -158,9 +162,11 @@ public class NetworkLibrary { private void removeAllLoadedLinks() { final LinkedList toRemove = new LinkedList(); - for (INetworkLink link : myLinks) { - if (!(link instanceof ICustomNetworkLink)) { - toRemove.add(link); + synchronized (myLinks) { + for (INetworkLink link : myLinks) { + if (!(link instanceof ICustomNetworkLink)) { + toRemove.add(link); + } } } myLinks.removeAll(toRemove); @@ -233,9 +239,11 @@ public class NetworkLibrary { public String rewriteUrl(String url, boolean externalUrl) { final String host = ZLNetworkUtil.hostFromUrl(url).toLowerCase(); - for (INetworkLink link : myLinks) { - if (host.contains(link.getSiteName())) { - url = link.rewriteUrl(url, externalUrl); + synchronized (myLinks) { + for (INetworkLink link : myLinks) { + if (host.contains(link.getSiteName())) { + url = link.rewriteUrl(url, externalUrl); + } } } return url;