mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-08-10 09:22:21 +00:00
fix apiservice
This commit is contained in:
@ -11,6 +11,8 @@ import dagger.hilt.android.HiltAndroidApp
|
||||
class App : Application(){
|
||||
private val TAG = "AppSerang"
|
||||
|
||||
// var tokenTes: String? = null
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
@ -30,6 +32,7 @@ class App : Application(){
|
||||
}
|
||||
|
||||
val token = task.result
|
||||
// tokenTes = token
|
||||
Log.d(TAG, "FCM token retrieved: $token")
|
||||
|
||||
// Save token locally
|
||||
@ -42,7 +45,6 @@ class App : Application(){
|
||||
}
|
||||
|
||||
private fun sendTokenToServer(token: String) {
|
||||
// TODO: Implement your API call
|
||||
Log.d(TAG, "Would send token to server: $token")
|
||||
}
|
||||
}
|
@ -74,6 +74,8 @@ class ChatRepository @Inject constructor(
|
||||
chatimg = imagePart
|
||||
)
|
||||
|
||||
Log.d("ChatRepository", "check data productId=$productIdPart, storeId=$storeIdPart, messageTxt=$messagePart, chatImg=$imagePart")
|
||||
|
||||
if (response.isSuccessful) {
|
||||
val body = response.body()
|
||||
if (body != null) {
|
||||
|
@ -28,6 +28,7 @@ class MainActivity : AppCompatActivity() {
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
private lateinit var apiService: ApiService
|
||||
private lateinit var sessionManager: SessionManager
|
||||
|
||||
// private val viewModel: NotifViewModel by viewModels()
|
||||
private val navController by lazy {
|
||||
(supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment).navController
|
||||
|
Reference in New Issue
Block a user