Skip to content

Commit

Permalink
Merge pull request #13263 from woocommerce/feature/update-about-library
Browse files Browse the repository at this point in the history
Update About library version
  • Loading branch information
hafizrahman authored Jan 9, 2025
2 parents 4eaea61 + e2a0587 commit 18662a5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ package com.woocommerce.android.ui.prefs

import android.content.Context
import androidx.appcompat.app.AppCompatActivity
import com.automattic.about.model.*
import com.automattic.about.model.AboutConfig
import com.automattic.about.model.AboutFooterConfig
import com.automattic.about.model.AnalyticsConfig
import com.automattic.about.model.AutomatticConfig
import com.automattic.about.model.HeaderConfig
import com.automattic.about.model.LegalConfig
import com.automattic.about.model.RateUsConfig
import com.automattic.about.model.ShareConfig
import com.automattic.about.model.SocialsConfig
import com.automattic.about.model.WorkWithUsConfig
import com.woocommerce.android.AppConstants
import com.woocommerce.android.AppUrls
import com.woocommerce.android.R
Expand All @@ -17,6 +26,7 @@ class AboutConfigBuilder @Inject constructor(
AboutConfig(
headerConfig = HeaderConfig.fromContext(activity),
rateUsConfig = RateUsConfig.fromContext(activity),
shareConfigFactory = { createShareConfig(activity) },
socialsConfig = SocialsConfig(
twitterUsername = AppConstants.TWITTER_USERNAME,
instagramUsername = AppConstants.INSTAGRAM_USERNAME,
Expand All @@ -26,11 +36,15 @@ class AboutConfigBuilder @Inject constructor(
privacyPolicyUrl = AppUrls.AUTOMATTIC_PRIVACY_POLICY,
californiaPrivacyNoticeUrl = AppUrls.AUTOMATTIC_PRIVACY_POLICY_CA,
),
shareConfigFactory = { createShareConfig(activity) },
automatticConfig = AutomatticConfig(true),
workWithUsConfig = WorkWithUsConfig(
title = activity.getString(R.string.about_automattic_work_with_us_item_title),
subtitle = activity.getString(R.string.about_automattic_work_with_us_item_subtitle),
url = AppUrls.AUTOMATTIC_HIRING
),
aboutFooterConfig = AboutFooterConfig(true),
analyticsConfig = createAnalyticsConfig(),
onDismiss = {
activity.finish()
},
onDismiss = { activity.finish() },
)

private fun createShareConfig(context: Context) = ShareConfig(
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ androidx-wear-watchface = '1.2.1'
androidx-work = '2.7.1'
apache-commons-text = '1.10.0'
apache-http-client-android = '4.3.5.1'
automattic-about = '0.0.6'
automattic-about = '1.5.1'
automattic-measure-builds = '2.1.2'
automattic-tracks = '5.0.0'
assertj = '3.24.1'
Expand Down

0 comments on commit 18662a5

Please sign in to comment.