From 2554f1fd48014703f56e6869dacd7455b448e5a6 Mon Sep 17 00:00:00 2001 From: kxxhyorim Date: Tue, 14 Nov 2023 03:50:42 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT]=20BaseViewModel=EC=97=90=20shotSwmLoggin?= =?UTF-8?q?g=20=EC=B6=94=EA=B0=80=20(#156)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lgtm/android/common_ui/base/BaseViewModel.kt | 6 ++++++ .../java/com/lgtm/android/auth/ui/signup/SignUpActivity.kt | 2 +- .../java/com/lgtm/android/auth/ui/splash/SplashActivity.kt | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/common-ui/src/main/java/com/lgtm/android/common_ui/base/BaseViewModel.kt b/common-ui/src/main/java/com/lgtm/android/common_ui/base/BaseViewModel.kt index 17256330..aa196346 100644 --- a/common-ui/src/main/java/com/lgtm/android/common_ui/base/BaseViewModel.kt +++ b/common-ui/src/main/java/com/lgtm/android/common_ui/base/BaseViewModel.kt @@ -6,6 +6,8 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import com.lgtm.domain.entity.LgtmResponseException +import com.lgtm.domain.logging.SwmCommonLoggingScheme +import com.swm.logging.android.SWMLogging import kotlinx.coroutines.CoroutineExceptionHandler abstract class BaseViewModel : ViewModel() { @@ -30,4 +32,8 @@ abstract class BaseViewModel : ViewModel() { } } } + + fun shotSwmLogging(scheme : SwmCommonLoggingScheme) { + SWMLogging.logEvent(scheme) + } } diff --git a/feature/auth/src/main/java/com/lgtm/android/auth/ui/signup/SignUpActivity.kt b/feature/auth/src/main/java/com/lgtm/android/auth/ui/signup/SignUpActivity.kt index 16a1c94d..c33a1374 100644 --- a/feature/auth/src/main/java/com/lgtm/android/auth/ui/signup/SignUpActivity.kt +++ b/feature/auth/src/main/java/com/lgtm/android/auth/ui/signup/SignUpActivity.kt @@ -32,6 +32,6 @@ class SignUpActivity : BaseActivity(R.layout.activity_sig .setEventLogName("signUpExposure") .setScreenName(this.javaClass) .build() - signUpViewModel.shotSignUpExposureLogging(scheme) + viewModel?.shotSwmLogging(scheme) } } \ No newline at end of file diff --git a/feature/auth/src/main/java/com/lgtm/android/auth/ui/splash/SplashActivity.kt b/feature/auth/src/main/java/com/lgtm/android/auth/ui/splash/SplashActivity.kt index 56b9f0cf..02c6dc67 100644 --- a/feature/auth/src/main/java/com/lgtm/android/auth/ui/splash/SplashActivity.kt +++ b/feature/auth/src/main/java/com/lgtm/android/auth/ui/splash/SplashActivity.kt @@ -37,7 +37,7 @@ class SplashActivity : BaseActivity(R.layout.activity_spl .setEventLogName("splashExposure") .setScreenName(this.javaClass) .build() - splashViewModel.shotSplashExposureLogging(scheme) + viewModel?.shotSwmLogging(scheme) } override fun onResume() {