|
@@ -13,7 +13,9 @@ import com.khmer9.sbcmain.app.App
|
|
import com.khmer9.sbcmain.app.DownloadController
|
|
import com.khmer9.sbcmain.app.DownloadController
|
|
import com.khmer9.sbcmain.app.ShareActivity
|
|
import com.khmer9.sbcmain.app.ShareActivity
|
|
import com.khmer9.sbcmain.base.BaseFragment
|
|
import com.khmer9.sbcmain.base.BaseFragment
|
|
|
|
+import com.khmer9.sbcmain.extension.btnClick
|
|
import com.khmer9.sbcmain.remote.User
|
|
import com.khmer9.sbcmain.remote.User
|
|
|
|
+import kotlinx.android.synthetic.main.layout_sub_module.*
|
|
|
|
|
|
class SubModuleFragment : BaseFragment(R.layout.layout_sub_module) {
|
|
class SubModuleFragment : BaseFragment(R.layout.layout_sub_module) {
|
|
private val shareViewModel = App.injectShareViewModel()
|
|
private val shareViewModel = App.injectShareViewModel()
|
|
@@ -29,7 +31,7 @@ class SubModuleFragment : BaseFragment(R.layout.layout_sub_module) {
|
|
|
|
|
|
private val LOTTO_PLUS_APP_ID = "62e397edae71cfa8782aa3a0"
|
|
private val LOTTO_PLUS_APP_ID = "62e397edae71cfa8782aa3a0"
|
|
private val LOTTO_PLUS_DOWNLOAD = "https://www.dropbox.com/s/3rz6v50tjn6f2jg/Lottery-Mobile_devDebug_1.0.30-dev.apk?dl=1"
|
|
private val LOTTO_PLUS_DOWNLOAD = "https://www.dropbox.com/s/3rz6v50tjn6f2jg/Lottery-Mobile_devDebug_1.0.30-dev.apk?dl=1"
|
|
- private val LOTTO_PLUS_PACKAGE = "com.sambath.sbc"
|
|
+ private val LOTTO_PLUS_PACKAGE = "com.sambath.lottoplus"
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
super.onCreate(savedInstanceState)
|
|
super.onCreate(savedInstanceState)
|
|
@@ -44,6 +46,14 @@ class SubModuleFragment : BaseFragment(R.layout.layout_sub_module) {
|
|
(requireActivity() as ShareActivity).apply {
|
|
(requireActivity() as ShareActivity).apply {
|
|
recyclerView = view.findViewById(R.id.rv_main)
|
|
recyclerView = view.findViewById(R.id.rv_main)
|
|
|
|
|
|
|
|
+ close_btn.setOnClickListener {
|
|
|
|
+ it.btnClick().subscribe() {
|
|
|
|
+ (requireActivity() as? ShareActivity)?.apply {
|
|
|
|
+ onBackPressed()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
val moduleId = requireArguments().getString(ARG_PARAM1)
|
|
val moduleId = requireArguments().getString(ARG_PARAM1)
|
|
if (!moduleId.isNullOrEmpty()) {
|
|
if (!moduleId.isNullOrEmpty()) {
|
|
shareViewModel.remoteSubModule(moduleId)
|
|
shareViewModel.remoteSubModule(moduleId)
|