mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Downloads restart automaticaly when opening content manager #418
This commit is contained in:
parent
5fb221882b
commit
77ed22f2e6
@ -1,5 +1,6 @@
|
||||
2.2
|
||||
FIX: Text To Speech issues on earlier Android versions
|
||||
FIX: Download reslience
|
||||
|
||||
2.1
|
||||
FIX: Display of storage devices
|
||||
|
@ -33,6 +33,8 @@ import java.math.MathContext;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.kiwix.kiwixmobile.database.BookDao;
|
||||
import org.kiwix.kiwixmobile.database.KiwixDatabase;
|
||||
import org.kiwix.kiwixmobile.downloader.DownloadFragment;
|
||||
import org.kiwix.kiwixmobile.downloader.DownloadIntent;
|
||||
import org.kiwix.kiwixmobile.downloader.DownloadService;
|
||||
@ -100,6 +102,12 @@ public class LibraryFragment extends Fragment implements AdapterView.OnItemClick
|
||||
} else {
|
||||
noNetworkConnection();
|
||||
}
|
||||
|
||||
BookDao bookDao = new BookDao(KiwixDatabase.getInstance(getActivity()));
|
||||
for (LibraryNetworkEntity.Book book : bookDao.getDownloadingBooks()) {
|
||||
book.url = book.remoteUrl;
|
||||
downloadFile(book);
|
||||
}
|
||||
// The FragmentActivity doesn't contain the layout directly so we must use our instance of LinearLayout :
|
||||
//llLayout.findViewById(R.id.someGuiElement);
|
||||
// Instead of :
|
||||
|
Loading…
x
Reference in New Issue
Block a user