Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 03f3cfa
Merge: 2b3a096 533a5f4
Author: Son Myeongji <114990782+m6z1@users.noreply.github.com>
Date:   Sat Dec 28 19:49:17 2024 +0900

    Merge branch 'release/1.0.6' into release_wss

commit 533a5f4
Author: m6z1 <sonmyungj1zz@gmail.com>
Date:   Sat Dec 28 19:47:38 2024 +0900

    build: 버전 1.0.6 업데이트

commit e966b62
Merge: 122407a d2d1bb4
Author: Son Myeongji <114990782+m6z1@users.noreply.github.com>
Date:   Sat Dec 28 19:44:39 2024 +0900

    Merge pull request #502 from Team-WSS/feat/497

    feat: 비로그인 로직을 제거

commit 2b3a096
Author: Son Myeongji <114990782+m6z1@users.noreply.github.com>
Date:   Sat Dec 28 19:33:36 2024 +0900

    Revert "Merge branch 'release/1.0.6' into release_"

    This reverts commit e9b8355, reversing
    changes made to a37629d.

commit d2d1bb4
Author: m6z1 <sonmyungj1zz@gmail.com>
Date:   Sat Dec 28 19:22:21 2024 +0900

    feat: 비로그인 둘러보기 버튼 제거

commit e9b8355
Merge: a37629d 61e33f0
Author: librarywon <librarywon@naver.com>
Date:   Fri Dec 27 23:15:57 2024 +0900

    Merge branch 'release/1.0.6' into release_

commit 61e33f0
Author: librarywon <librarywon@naver.com>
Date:   Fri Dec 27 23:15:28 2024 +0900

    🚀 Release 1.0.6

commit a37629d
Merge: 7710b89 122407a
Author: librarywon <librarywon@naver.com>
Date:   Fri Dec 27 23:08:58 2024 +0900

    Merge remote-tracking branch 'origin/develop' into release_

commit 7710b89
Merge: b69f9c5 16e0e1b
Author: librarywon <librarywon@naver.com>
Date:   Fri Dec 27 23:06:28 2024 +0900

    Merge remote-tracking branch 'origin/release/1.0.5' into release_

commit 122407a
Merge: e6ce3ce 35f1503
Author: YeonJeen <144861180+yeonjeen@users.noreply.github.com>
Date:   Fri Dec 27 14:28:29 2024 +0900

    Merge pull request #500 from Team-WSS/feat/499

    feat: 앱 내 공지 하이퍼링크 구현

commit 35f1503
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Fri Dec 27 14:27:08 2024 +0900

    refactor: import로 코드 정리

commit 903f948
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Thu Dec 26 10:32:36 2024 +0900

    feat: 공지 텍스트뷰 내 하이퍼링크 구현

commit e2444c1
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Thu Dec 26 10:31:36 2024 +0900

    feat: 텍스트뷰 링크 활성화

commit e6ce3ce
Merge: 5385b66 d05e3d9
Author: YeonJeen <144861180+yeonjeen@users.noreply.github.com>
Date:   Thu Dec 26 10:15:41 2024 +0900

    Merge pull request #491 from Team-WSS/feat/478

    feat: 최소버전 강제 업데이트 구현

commit d05e3d9
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 25 18:17:27 2024 +0900

    refactor: 불필요한 코드 제거

commit 98f8b2c
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 25 17:19:09 2024 +0900

    refactor: 버전네임 형식으로 최소버전 비교

commit c1ec4c2
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 25 13:07:46 2024 +0900

    feat: 스플래쉬에서 강제업데이트 다이얼로그 구현

commit 21aa8ab
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 25 13:07:13 2024 +0900

    refactor: 강제업데이트 스플래쉬에서 처리를 위한 홈 불필요한 코드 삭제

commit 2add763
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 25 13:06:36 2024 +0900

    refactor: 버전처리 및 운영체제 값 처리

commit 3bb10cd
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 25 13:05:59 2024 +0900

    refactor: 운영체제 값 레포지터리에서 처리

commit 41f2a84
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 25 13:05:01 2024 +0900

    refactor: 다이얼로그 패키지 변경

commit e7fbc60
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 25 13:04:43 2024 +0900

    refactor: 업데이트 날짜 삭제

commit 463b096
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 25 13:02:25 2024 +0900

    refactor: 플레이스토어 링크 deepLinks.xml로 이동

commit 5385b66
Merge: 09dc75e 4c71d8f
Author: YeonJeen <144861180+yeonjeen@users.noreply.github.com>
Date:   Tue Dec 24 16:06:46 2024 +0900

    Merge pull request #495 from Team-WSS/feat/492

    feat: 마이페이지 스티키헤더 스크롤 문제 해결

commit 09dc75e
Merge: aeacd88 82ee749
Author: GongBaek <127238018+junseo511@users.noreply.github.com>
Date:   Mon Dec 23 17:01:54 2024 +0900

    Merge pull request #494 from Team-WSS/feat/493

commit aeacd88
Merge: 16e0e1b d49cf08
Author: Jaewon Seo <52442547+librarywon@users.noreply.github.com>
Date:   Mon Dec 23 16:52:39 2024 +0900

    Merge pull request #498 from Team-WSS/feat/477

    feat: 앰플리튜드 이벤트 트래커 도입

commit d49cf08
Author: librarywon <librarywon@naver.com>
Date:   Mon Dec 23 16:11:45 2024 +0900

    refactor: util의 하위로 패키지 이동

commit 697efbf
Author: librarywon <librarywon@naver.com>
Date:   Fri Dec 20 17:26:03 2024 +0900

    feat: amplitude 이벤트 트래킹 추가

commit c6b342f
Author: librarywon <librarywon@naver.com>
Date:   Thu Dec 19 16:07:49 2024 +0900

    feat: 유저차단 이벤트 트래킹 추가

commit 5978dba
Author: librarywon <librarywon@naver.com>
Date:   Thu Dec 19 16:07:31 2024 +0900

    feat: 유저정보 이벤트 트래킹 추가

commit 83b66be
Author: librarywon <librarywon@naver.com>
Date:   Thu Dec 19 16:06:43 2024 +0900

    feat: 키워드 추가 문의하기 이벤트 트래킹 추가

commit b18a1fe
Author: librarywon <librarywon@naver.com>
Date:   Thu Dec 19 16:06:22 2024 +0900

    feat: 탐색 이벤트 트래킹 추가

commit c43fe28
Author: librarywon <librarywon@naver.com>
Date:   Thu Dec 19 15:36:43 2024 +0900

    feat: 탐색 이벤트 트래킹 추가

commit 08b1783
Author: librarywon <librarywon@naver.com>
Date:   Thu Dec 19 15:28:56 2024 +0900

    feat: 홈 이벤트 트래킹 추가

commit 1405871
Author: librarywon <librarywon@naver.com>
Date:   Thu Dec 19 15:28:27 2024 +0900

    feat: 일반 검색 진입 이벤트 트래킹 추가

commit 4268cf1
Author: librarywon <librarywon@naver.com>
Date:   Thu Dec 19 14:33:16 2024 +0900

    feat: 타유저 마이페이지 진입 이벤트 트래킹 추가

commit 4c71d8f
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 16:35:16 2024 +0900

    feat: 3줄 이상 자기소개 입력 막아두기 구현

commit 82ee749
Author: junseo511 <prime54@g.skku.edu>
Date:   Wed Dec 18 15:46:15 2024 +0900

    refactor: 툴팁 윈도우 안정성 향상

commit 42c2ace
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 15:41:48 2024 +0900

    fix: CollapsingToolbarLayout height 고정값 설정

commit fe56d67
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 15:41:13 2024 +0900

    fix: CollapsingToolbarLayout height 고정값 설정

commit 6e8fd8b
Author: librarywon <librarywon@naver.com>
Date:   Sun Dec 15 16:58:51 2024 +0900

    feat: AmplitudeTracker 구현

commit 86475ca
Author: librarywon <librarywon@naver.com>
Date:   Sun Dec 15 14:57:22 2024 +0900

    feat: amplitude 의존성 추가

commit 61ae580
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 03:27:23 2024 +0900

    refactor: 불필요한 변수 선언 수정

commit 3e001f0
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 03:19:23 2024 +0900

    feat: 홈에서 최소버전 강제 업데이트 팝업 호출

commit d879e75
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 03:18:24 2024 +0900

    feat: 최소버전 강제 업데이트 팝업 프레그먼트 구현

commit bc8fed9
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 03:16:49 2024 +0900

    feat: 업데이트 플레이스토어 url 스트링 추출

commit f83c976
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 03:10:23 2024 +0900

    feat: 최소버전과 현재 버전 비교 후 업데이트 여부 구현

commit 18db1a2
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 03:05:30 2024 +0900

    feat: 최소버전 Entity 매핑

commit ef58e24
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 03:05:06 2024 +0900

    feat: 최소버전 팝업 스트링 추출

commit d6d1dd4
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 03:04:21 2024 +0900

    feat: 최소버전 팝업 xml 구현

commit e8d9235
Author: yeonjeen <jeendev2019@gmail.com>
Date:   Wed Dec 18 03:02:55 2024 +0900

    feat: 최소버전 api 연결
  • Loading branch information
m6z1 committed Dec 29, 2024
1 parent 16e0e1b commit 8323ced
Show file tree
Hide file tree
Showing 41 changed files with 545 additions and 47 deletions.
9 changes: 7 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ android {
applicationId = "com.into.websoso"
minSdk = 30
targetSdk = 34
versionCode = 10005
versionName = "1.0.5"
versionCode = 10006
versionName = "1.0.6"

buildConfigField("String", "BASE_URL", gradleLocalProperties(rootDir).getProperty("base.url"))
buildConfigField("String", "S3_BASE_URL", gradleLocalProperties(rootDir).getProperty("s3.url"))
buildConfigField("String", "KAKAO_APP_KEY", gradleLocalProperties(rootDir).getProperty("kakao.app.key"))
buildConfigField("String", "AMPLITUDE_KEY", gradleLocalProperties(rootDir).getProperty("amplitude.key"))

manifestPlaceholders["kakaoAppKey"] = gradleLocalProperties(rootDir)
.getProperty("kakao.app.key").replace("\"", "")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -116,4 +118,7 @@ dependencies {
// Firebase
implementation(platform("com.google.firebase:firebase-bom:33.7.0"))
implementation("com.google.firebase:firebase-analytics")

// Amplitude
implementation("com.amplitude:analytics-android:1.+")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.into.websoso.common.util.tracker

interface Tracker {
fun trackEvent(
eventName: String,
properties: Map<String, Any?> = emptyMap(),
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.into.websoso.common.util.tracker.amplitude

import android.content.Context
import com.amplitude.android.Amplitude
import com.amplitude.android.Configuration
import com.amplitude.android.autocaptureOptions
import com.into.websoso.common.util.tracker.Tracker

class AmplitudeTracker(context: Context, apiKey: String) : Tracker {
private val amplitude =
Amplitude(
Configuration(
apiKey = apiKey,
context = context,
autocapture =
autocaptureOptions {
+sessions
+appLifecycles
+screenViews
},
),
)

override fun trackEvent(
eventName: String,
properties: Map<String, Any?>,
) {
amplitude.track(eventName, properties)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.into.websoso.common.util.tracker.di

import android.content.Context
import com.into.websoso.BuildConfig
import com.into.websoso.common.util.tracker.Tracker
import com.into.websoso.common.util.tracker.amplitude.AmplitudeTracker
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object TrackerModule {
@Provides
@Singleton
fun provideTracker(
@ApplicationContext context: Context,
): Tracker {
return AmplitudeTracker(context, BuildConfig.AMPLITUDE_KEY)
}
}
5 changes: 5 additions & 0 deletions app/src/main/java/com/into/websoso/data/di/ApiModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.into.websoso.data.remote.api.NoticeApi
import com.into.websoso.data.remote.api.NovelApi
import com.into.websoso.data.remote.api.UserApi
import com.into.websoso.data.remote.api.UserNovelApi
import com.into.websoso.data.remote.api.VersionApi
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down Expand Up @@ -52,4 +53,8 @@ object ApiModule {
@Provides
@Singleton
fun provideAvatarApi(@Secured retrofit: Retrofit): AvatarApi = retrofit.create(AvatarApi::class.java)

@Provides
@Singleton
fun provideVersionApi(@Secured retrofit: Retrofit): VersionApi = retrofit.create(VersionApi::class.java)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import com.into.websoso.data.remote.api.AuthApi
import com.into.websoso.data.remote.api.FeedApi
import com.into.websoso.data.remote.api.NovelApi
import com.into.websoso.data.remote.api.UserApi
import com.into.websoso.data.remote.api.VersionApi
import com.into.websoso.data.repository.AuthRepository
import com.into.websoso.data.repository.FeedRepository
import com.into.websoso.data.repository.NovelRepository
import com.into.websoso.data.repository.UserRepository
import com.into.websoso.data.repository.VersionRepository
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down Expand Up @@ -42,4 +44,8 @@ object RepositoryModule {
authApi: AuthApi,
preferences: SharedPreferences,
): AuthRepository = AuthRepository(authApi, preferences)
}

@Provides
@Singleton
fun provideVersionRepository(versionApi: VersionApi): VersionRepository = VersionRepository(versionApi)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.into.websoso.data.mapper

import com.into.websoso.data.model.MinimumVersionEntity
import com.into.websoso.data.remote.response.MinimumVersionResponseDto

fun MinimumVersionResponseDto.toData(): MinimumVersionEntity =
MinimumVersionEntity(
minimumVersion = minimumVersion,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.into.websoso.data.model

data class MinimumVersionEntity(
val minimumVersion: String,
)
12 changes: 12 additions & 0 deletions app/src/main/java/com/into/websoso/data/remote/api/VersionApi.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.into.websoso.data.remote.api

import com.into.websoso.data.remote.response.MinimumVersionResponseDto
import retrofit2.http.GET
import retrofit2.http.Query

interface VersionApi {
@GET("minimum-version")
suspend fun getMinimumVersion(
@Query("os") os: String,
): MinimumVersionResponseDto
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.into.websoso.data.remote.response

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class MinimumVersionResponseDto (
@SerialName("minimumVersion")
val minimumVersion: String,
@SerialName("updateDate")
val updateDate: String,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package com.into.websoso.data.repository

import com.into.websoso.BuildConfig
import com.into.websoso.data.mapper.toData
import com.into.websoso.data.model.MinimumVersionEntity
import com.into.websoso.data.remote.api.VersionApi
import javax.inject.Inject

class VersionRepository @Inject constructor(
private val versionApi: VersionApi,
) {
suspend fun isUpdateRequired(): Boolean {
val currentVersion = BuildConfig.VERSION_NAME
val minVersion = fetchMinimumVersion().minimumVersion

return compareVersions(parseVersionName(currentVersion), parseVersionName(minVersion))
}

private suspend fun fetchMinimumVersion(): MinimumVersionEntity {
return versionApi.getMinimumVersion(os = OS).toData()
}

private fun parseVersionName(version: String): List<Int> {
return version.split(".").map { it.toIntOrNull() ?: 0 }
}

private fun compareVersions(currentVersionParts: List<Int>, minVersionParts: List<Int>): Boolean {
for (i in 0 until maxOf(currentVersionParts.size, minVersionParts.size)) {
val current = currentVersionParts.getOrNull(i) ?: 0
val min = minVersionParts.getOrNull(i) ?: 0
if (current < min) return true
if (current > min) return false
}
return false
}

companion object {
private const val OS = "android"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ import com.into.websoso.R.string.change_user_info_message
import com.into.websoso.common.ui.base.BaseActivity
import com.into.websoso.common.ui.model.ResultFrom.ChangeUserInfo
import com.into.websoso.common.util.showWebsosoSnackBar
import com.into.websoso.common.util.tracker.Tracker
import com.into.websoso.databinding.ActivityAccountInfoBinding
import com.into.websoso.ui.blockedUsers.BlockedUsersActivity
import com.into.websoso.ui.changeUserInfo.ChangeUserInfoActivity
import com.into.websoso.ui.withdraw.first.WithdrawFirstActivity
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@AndroidEntryPoint
class AccountInfoActivity :
BaseActivity<ActivityAccountInfoBinding>(R.layout.activity_account_info) {
@Inject
lateinit var tracker: Tracker

private val accountInfoViewModel: AccountInfoViewModel by viewModels()
private val startActivityLauncher = registerForActivityResult(
ActivityResultContracts.StartActivityForResult()
Expand Down Expand Up @@ -62,6 +67,7 @@ class AccountInfoActivity :

private fun onWithDrawButtonClick() {
binding.clAccountInfoWithdraw.setOnClickListener {
tracker.trackEvent("withdraw")
val intent = WithdrawFirstActivity.getIntent(this)
startActivity(intent)
}
Expand All @@ -75,6 +81,7 @@ class AccountInfoActivity :

private fun onChangeUserInfoButtonClick() {
binding.clAccountInfoChangeUserInfo.setOnClickListener {
tracker.trackEvent("logout")
val intent = ChangeUserInfoActivity.getIntent(this)
startActivityLauncher.launch(intent)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ import com.into.websoso.common.ui.model.ResultFrom.CreateFeed
import com.into.websoso.common.util.SingleEventHandler
import com.into.websoso.common.util.getAdaptedParcelableExtra
import com.into.websoso.common.util.toFloatPxFromDp
import com.into.websoso.common.util.tracker.Tracker
import com.into.websoso.databinding.ActivityCreateFeedBinding
import com.into.websoso.ui.createFeed.model.CreatedFeedCategoryModel
import com.into.websoso.ui.feedDetail.model.EditFeedModel
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@AndroidEntryPoint
class CreateFeedActivity : BaseActivity<ActivityCreateFeedBinding>(activity_create_feed) {
@Inject
lateinit var tracker: Tracker

private val createFeedViewModel: CreateFeedViewModel by viewModels()
private val singleEventHandler: SingleEventHandler by lazy { SingleEventHandler.from() }

Expand All @@ -48,6 +53,7 @@ class CreateFeedActivity : BaseActivity<ActivityCreateFeedBinding>(activity_crea
bindViewModel()
setupObserver()
createFeedViewModel.categories.setupCategoryChips()
tracker.trackEvent("write")
}

private fun setupView() {
Expand Down Expand Up @@ -100,6 +106,7 @@ class CreateFeedActivity : BaseActivity<ActivityCreateFeedBinding>(activity_crea
else -> createFeedViewModel.editFeed(editFeedModel.feedId)
}

tracker.trackEvent("write_feed")
setResult(CreateFeed.RESULT_OK)
if (!isFinishing) finish()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ import com.into.websoso.R.layout.dialog_create_feed_search_novel
import com.into.websoso.common.ui.base.BaseBottomSheetDialog
import com.into.websoso.common.util.InfiniteScrollListener
import com.into.websoso.common.util.SingleEventHandler
import com.into.websoso.common.util.tracker.Tracker
import com.into.websoso.databinding.DialogCreateFeedSearchNovelBinding
import com.into.websoso.ui.createFeed.adapter.SearchNovelAdapter
import com.into.websoso.ui.createFeed.adapter.SearchNovelItemType.Loading
import com.into.websoso.ui.createFeed.adapter.SearchNovelItemType.Novels
import com.into.websoso.ui.createFeed.model.SearchNovelUiState
import javax.inject.Inject

class CreateFeedSearchNovelBottomSheetDialog :
BaseBottomSheetDialog<DialogCreateFeedSearchNovelBinding>(dialog_create_feed_search_novel) {
@Inject
lateinit var tracker: Tracker

private val createFeedViewModel: CreateFeedViewModel by activityViewModels()
private val singleEventHandler: SingleEventHandler by lazy { SingleEventHandler.from() }
private val searchNovelAdapter: SearchNovelAdapter by lazy { SearchNovelAdapter(::onNovelClick) }
Expand Down Expand Up @@ -119,9 +124,10 @@ class CreateFeedSearchNovelBottomSheetDialog :
}

private fun setupNavigateToInquireNovel() {
tracker.trackEvent("contact_novel_connect")
val inquireUrl = getString(R.string.inquire_link)
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(inquireUrl))
binding.tvCreateFeedAddNovelInquireButton.setOnClickListener{
binding.tvCreateFeedAddNovelInquireButton.setOnClickListener {
startActivity(intent)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,22 @@ import com.into.websoso.common.ui.model.CategoriesModel.CategoryModel.KeywordMod
import com.into.websoso.common.ui.model.CategoriesModel.Companion.findKeywordByName
import com.into.websoso.common.util.SingleEventHandler
import com.into.websoso.common.util.toFloatPxFromDp
import com.into.websoso.common.util.tracker.Tracker
import com.into.websoso.databinding.FragmentDetailExploreKeywordBinding
import com.into.websoso.ui.detailExplore.DetailExploreViewModel
import com.into.websoso.ui.detailExplore.keyword.adapter.DetailExploreKeywordAdapter
import com.into.websoso.ui.detailExplore.keyword.model.DetailExploreKeywordUiState
import com.into.websoso.ui.detailExploreResult.DetailExploreResultActivity
import com.into.websoso.ui.detailExploreResult.model.DetailExploreFilteredModel
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@AndroidEntryPoint
class DetailExploreKeywordFragment :
BaseFragment<FragmentDetailExploreKeywordBinding>(R.layout.fragment_detail_explore_keyword) {
@Inject
lateinit var tracker: Tracker

private val detailExploreViewModel: DetailExploreViewModel by activityViewModels()
private val singleEventHandler: SingleEventHandler by lazy { SingleEventHandler.from() }
private val detailExploreKeywordAdapter: DetailExploreKeywordAdapter by lazy {
Expand All @@ -54,6 +59,7 @@ class DetailExploreKeywordFragment :
private fun onDetailExploreKeywordButtonClick() = object : DetailExploreClickListener {

override fun onNovelInquireButtonClick() {
tracker.trackEvent("contact_keyword")
val inquireUrl = getString(R.string.inquire_link)
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(inquireUrl))
startActivity(intent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ import com.into.websoso.common.ui.model.CategoriesModel.CategoryModel.KeywordMod
import com.into.websoso.common.ui.model.CategoriesModel.Companion.findKeywordByName
import com.into.websoso.common.util.SingleEventHandler
import com.into.websoso.common.util.toFloatPxFromDp
import com.into.websoso.common.util.tracker.Tracker
import com.into.websoso.databinding.FragmentDetailExploreResultKeywordBinding
import com.into.websoso.ui.detailExplore.keyword.DetailExploreClickListener
import com.into.websoso.ui.detailExplore.keyword.adapter.DetailExploreKeywordAdapter
import com.into.websoso.ui.detailExploreResult.model.DetailExploreResultUiState
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@AndroidEntryPoint
class DetailExploreResultKeywordFragment :
BaseFragment<FragmentDetailExploreResultKeywordBinding>(R.layout.fragment_detail_explore_result_keyword) {
@Inject
lateinit var tracker: Tracker

private val detailExploreResultViewModel: DetailExploreResultViewModel by activityViewModels()
private val singleEventHandler: SingleEventHandler by lazy { SingleEventHandler.from() }
private val detailExploreKeywordAdapter: DetailExploreKeywordAdapter by lazy {
Expand All @@ -41,6 +46,7 @@ class DetailExploreResultKeywordFragment :
setupSearchKeyword()
setupWebsosoSearchEditListener()
setupBackButtonListener()
tracker.trackEvent("seek_result")
}

private fun bindViewModel() {
Expand Down
Loading

0 comments on commit 8323ced

Please sign in to comment.