Removed Comments

This commit is contained in:
s-ayush2903 2020-09-11 02:45:11 +05:30
parent ae75cd1b38
commit 4fb6d60d96
No known key found for this signature in database
GPG Key ID: B4341DD08B2371CB
2 changed files with 2 additions and 25 deletions

View File

@ -22,7 +22,6 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import io.reactivex.disposables.CompositeDisposable
@ -68,20 +67,9 @@ class CustomDownloadFragment : BaseFragment() {
savedInstanceState: Bundle?
): View? {
super.onCreate(savedInstanceState)
val root = inflater.inflate(R.layout.activity_custom_download, container, false)
return root
return inflater.inflate(R.layout.activity_custom_download, container, false)
}
/**
* Called immediately after [.onCreateView]
* has returned, but before any saved state has been restored in to the view.
* This gives subclasses a chance to initialize themselves once
* they know their view hierarchy has been completely created. The fragment's
* view hierarchy is not however attached to its parent at this point.
* @param view The View returned by [.onCreateView].
* @param savedInstanceState If non-null, this fragment is being re-constructed
* from a previous saved state as given here.
*/
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val activity = requireActivity() as CoreMainActivity

View File

@ -36,13 +36,11 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.drawerlayout.widget.DrawerLayout
import org.kiwix.kiwixmobile.core.R2.id.start
import org.kiwix.kiwixmobile.core.base.BaseActivity
import org.kiwix.kiwixmobile.core.base.FragmentActivityExtensions.Super
import org.kiwix.kiwixmobile.core.base.FragmentActivityExtensions.Super.ShouldCall
import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.navigate
import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.setupDrawerToggle
import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.start
import org.kiwix.kiwixmobile.core.main.CoreReaderFragment
import org.kiwix.kiwixmobile.core.main.MainMenu
import org.kiwix.kiwixmobile.core.reader.ZimFileReader.Companion.CONTENT_PREFIX
@ -52,7 +50,6 @@ import org.kiwix.kiwixmobile.core.utils.dialog.KiwixDialog
import org.kiwix.kiwixmobile.custom.BuildConfig
import org.kiwix.kiwixmobile.custom.R
import org.kiwix.kiwixmobile.custom.customActivityComponent
import org.kiwix.kiwixmobile.custom.download.CustomDownloadFragment
import java.util.Locale
import javax.inject.Inject
@ -136,16 +133,8 @@ class CustomReaderFragment : CoreReaderFragment() {
requestPermissions(arrayOf(READ_EXTERNAL_STORAGE), REQUEST_READ_FOR_OBB)
} else {
activity?.finish()
// val manger = activity?.supportFragmentManager
// val trans = manger?.beginTransaction()
// val fragment = CustomDownloadFragment()
// // layoutInflater.inflate(R.layout.activity_custom_download)
// // trans?.apply { add(R.id.custom_drawer_container, fragment).commit() }
// trans?.add(R.id.custom_drawer_container, fragment)
// trans?.commit()
// trans?.apply { add(R.id.custom_drawer_container, fragment).commit() }
with(activity as AppCompatActivity) { navigate(R.id.customDownloadFragment) }
// activity?.start<CustomDownloadFragment>() // maybe a frag transaction will do the trick?
}
}
)