|
@@ -13,7 +13,9 @@ import com.khmer9.sbcmain.app.App
|
|
|
import com.khmer9.sbcmain.app.DownloadController
|
|
|
import com.khmer9.sbcmain.app.ShareActivity
|
|
|
import com.khmer9.sbcmain.base.BaseFragment
|
|
|
+import com.khmer9.sbcmain.extension.btnClick
|
|
|
import com.khmer9.sbcmain.remote.User
|
|
|
+import kotlinx.android.synthetic.main.layout_sub_module.*
|
|
|
|
|
|
class SubModuleFragment : BaseFragment(R.layout.layout_sub_module) {
|
|
|
private val shareViewModel = App.injectShareViewModel()
|
|
@@ -44,6 +46,14 @@ class SubModuleFragment : BaseFragment(R.layout.layout_sub_module) {
|
|
|
(requireActivity() as ShareActivity).apply {
|
|
|
recyclerView = view.findViewById(R.id.rv_main)
|
|
|
|
|
|
+ close_btn.setOnClickListener {
|
|
|
+ it.btnClick().subscribe() {
|
|
|
+ (requireActivity() as? ShareActivity)?.apply {
|
|
|
+ onBackPressed()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
val moduleId = requireArguments().getString(ARG_PARAM1)
|
|
|
if (!moduleId.isNullOrEmpty()) {
|
|
|
shareViewModel.remoteSubModule(moduleId)
|