Skip to content

Commit

Permalink
[app] add launch other app wiki link
Browse files Browse the repository at this point in the history
  • Loading branch information
Tornaco committed Mar 10, 2024
1 parent dca6c68 commit bccb6ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions android/android_framework/base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ buildConfig {
buildConfigField("String", "SU_SERVICE_CLASS", provider { "\"now.fortuitous.thanos.service.SuSupportService\"" })
buildConfigField("String", "THANOX_URL_DOCS_PROFILE", provider { "\"https://tornaco.github.io/Thanox-Docs/zh/guide/profile.html\"" })
buildConfigField("String", "THANOX_URL_DOCS_START_RULES", provider { "\"https://tornaco.github.io/Thanox-Docs/zh/guide/bg_start.html\"" })
buildConfigField("String", "THANOX_URL_DOCS_LAUNCH_OTHER_APP_RULES", provider { "\"https://tornaco.github.io/Thanox-Docs/zh/guide/launch_other_app.html\"" })
buildConfigField("String", "THANOX_URL_PLAY_VERSION", provider { "\"https://play.google.com/store/apps/details?id=github.tornaco.android.thanos.pro\"" })
buildConfigField("String", "THANOX_URL_DOCS_HOME", provider { "\"https://tornaco.github.io/Thanox-Docs\"" })

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
Expand All @@ -22,13 +23,15 @@ import com.google.accompanist.swiperefresh.SwipeRefresh
import com.google.accompanist.swiperefresh.SwipeRefreshIndicator
import com.google.accompanist.swiperefresh.rememberSwipeRefreshState
import dagger.hilt.android.AndroidEntryPoint
import github.tornaco.android.thanos.BuildProp
import github.tornaco.android.thanos.module.compose.common.ComposeThemeActivity
import github.tornaco.android.thanos.module.compose.common.DisposableEffectWithLifeCycle
import github.tornaco.android.thanos.module.compose.common.theme.TypographyDefaults
import github.tornaco.android.thanos.module.compose.common.widget.ListItem
import github.tornaco.android.thanos.module.compose.common.widget.TextInputDialog
import github.tornaco.android.thanos.module.compose.common.widget.ThanoxSmallAppBarScaffold
import github.tornaco.android.thanos.module.compose.common.widget.rememberTextInputState
import github.tornaco.android.thanos.util.BrowserUtils

@AndroidEntryPoint
class LaunchOtherAppRuleActivity : ComposeThemeActivity() {
Expand Down Expand Up @@ -64,6 +67,11 @@ class LaunchOtherAppRuleActivity : ComposeThemeActivity() {
thisActivity().finish()
},
actions = {
TextButton(onClick = {
BrowserUtils.launch(thisActivity(), BuildProp.THANOX_URL_DOCS_LAUNCH_OTHER_APP_RULES)
}) {
Text(stringResource(id = github.tornaco.android.thanos.module.common.R.string.common_menu_title_wiki))
}
IconButton(onClick = {
inputDialog.show()
}) {
Expand Down

0 comments on commit bccb6ac

Please sign in to comment.