mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-04 03:06:41 -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
|
2.2
|
||||||
FIX: Text To Speech issues on earlier Android versions
|
FIX: Text To Speech issues on earlier Android versions
|
||||||
|
FIX: Download reslience
|
||||||
|
|
||||||
2.1
|
2.1
|
||||||
FIX: Display of storage devices
|
FIX: Display of storage devices
|
||||||
|
@ -33,6 +33,8 @@ import java.math.MathContext;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedList;
|
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.DownloadFragment;
|
||||||
import org.kiwix.kiwixmobile.downloader.DownloadIntent;
|
import org.kiwix.kiwixmobile.downloader.DownloadIntent;
|
||||||
import org.kiwix.kiwixmobile.downloader.DownloadService;
|
import org.kiwix.kiwixmobile.downloader.DownloadService;
|
||||||
@ -100,6 +102,12 @@ public class LibraryFragment extends Fragment implements AdapterView.OnItemClick
|
|||||||
} else {
|
} else {
|
||||||
noNetworkConnection();
|
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 :
|
// The FragmentActivity doesn't contain the layout directly so we must use our instance of LinearLayout :
|
||||||
//llLayout.findViewById(R.id.someGuiElement);
|
//llLayout.findViewById(R.id.someGuiElement);
|
||||||
// Instead of :
|
// Instead of :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user