Close #2447 Only selected books are appearing in browser

This commit is contained in:
s-ayush2903 2020-12-03 03:46:02 +05:30
parent 2a54e16a04
commit 829fb23582
No known key found for this signature in database
GPG Key ID: B4341DD08B2371CB

View File

@ -139,6 +139,7 @@ class ZimHostFragment : BaseFragment(), ZimHostCallbacks, ZimHostContract.View {
startServerButton.setOnClickListener {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P || checkCoarseLocationAccessPermission()) {
bindService()
startStopServer()
}
}
@ -211,6 +212,7 @@ class ZimHostFragment : BaseFragment(), ZimHostCallbacks, ZimHostContract.View {
}
private fun stopServer() {
unbindService()
requireActivity().startService(createHotspotIntent(ACTION_STOP_SERVER))
}