Merge pull request #1392 from kiwix/feature/macgills/#1391-history-crash

HistoryActivity crashes when ZimFile is null #1391 - fix dao - supres…
This commit is contained in:
Seán Mac Gillicuddy 2019-08-21 13:29:21 +01:00 committed by GitHub
commit 40571e7f34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class HistoryDao @Inject constructor(val box: Box<HistoryEntity>) {
fun getHistoryList(showHistoryCurrentBook: Boolean) = box
.query {
if (showHistoryCurrentBook) {
equal(HistoryEntity_.zimFilePath, ZimContentProvider.getZimFile())
equal(HistoryEntity_.zimFilePath, ZimContentProvider.getZimFile() ?: "")
}
orderDesc(HistoryEntity_.timeStamp)
}

View File

@ -38,6 +38,7 @@ import static org.kiwix.kiwixmobile.zim_manager.local_file_transfer.LocalFileTra
/**
* Manager for the Wifi-P2p API, used in the local file transfer module
*/
@SuppressWarnings("MissingPermission")
public class WifiDirectManager
implements WifiP2pManager.ChannelListener, WifiP2pManager.PeerListListener,
WifiP2pManager.ConnectionInfoListener,