|
@@ -1,4 +1,4 @@
|
|
|
-package com.khmer9.yuki.screen.main
|
|
|
+package com.khmer9.sbcmain.screen.main
|
|
|
|
|
|
import android.annotation.SuppressLint
|
|
|
import android.content.Intent
|
|
@@ -10,17 +10,17 @@ import android.widget.Toast
|
|
|
import androidx.lifecycle.Observer
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager
|
|
|
import androidx.recyclerview.widget.RecyclerView
|
|
|
-import com.khmer9.yuki.R
|
|
|
-import com.khmer9.yuki.adapter.MainModuleAdapter
|
|
|
-import com.khmer9.yuki.app.App
|
|
|
-import com.khmer9.yuki.app.ShareActivity
|
|
|
-import com.khmer9.yuki.base.BaseFragment
|
|
|
-import com.khmer9.yuki.extension.btnClick
|
|
|
-import com.khmer9.yuki.remote.User
|
|
|
-import com.khmer9.yuki.remote.service.ConnectivityStates
|
|
|
-import com.khmer9.yuki.screen.report.StatementFragment
|
|
|
-import com.khmer9.yuki.screen.setting.SettingFragment
|
|
|
-import com.khmer9.yuki.screen.splash.SplashScreenActivity
|
|
|
+import com.khmer9.sbcmain.R
|
|
|
+import com.khmer9.sbcmain.adapter.MainModuleAdapter
|
|
|
+import com.khmer9.sbcmain.app.App
|
|
|
+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 com.khmer9.sbcmain.remote.service.ConnectivityStates
|
|
|
+import com.khmer9.sbcmain.screen.report.StatementFragment
|
|
|
+import com.khmer9.sbcmain.screen.setting.SettingFragment
|
|
|
+import com.khmer9.sbcmain.screen.splash.SplashScreenActivity
|
|
|
|
|
|
|
|
|
class MainFragment : BaseFragment(R.layout.layout_fragment_main_yuki) {
|
|
@@ -137,9 +137,14 @@ class MainFragment : BaseFragment(R.layout.layout_fragment_main_yuki) {
|
|
|
}
|
|
|
} else {
|
|
|
if (appId == YUKI_APP_ID) {
|
|
|
- val launchIntent = requireContext().packageManager.getLaunchIntentForPackage("com.khmer9.yuki")
|
|
|
- //launchIntent?.putExtra("data", data)
|
|
|
- startActivity(launchIntent)
|
|
|
+ (requireActivity() as ShareActivity).apply {
|
|
|
+ val launchIntent = packageManager.getLaunchIntentForPackage("com.khmer9.yuki")
|
|
|
+ if (launchIntent != null) {
|
|
|
+ startActivity(launchIntent)
|
|
|
+ } else {
|
|
|
+ //installed
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|