From 2e69c7e3001a036a552dd5d67b9fbb86f64ab64f Mon Sep 17 00:00:00 2001 From: Ash Date: Sun, 24 Apr 2022 20:26:56 +0800 Subject: [PATCH] Improve button tips for TipsAndSupport page button tips --- .../reader/ui/page/settings/TipsAndSupport.kt | 19 +++++++++++++++++-- app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/me/ash/reader/ui/page/settings/TipsAndSupport.kt b/app/src/main/java/me/ash/reader/ui/page/settings/TipsAndSupport.kt index c1d8f7d..649ef64 100644 --- a/app/src/main/java/me/ash/reader/ui/page/settings/TipsAndSupport.kt +++ b/app/src/main/java/me/ash/reader/ui/page/settings/TipsAndSupport.kt @@ -54,7 +54,9 @@ fun TipsAndSupport( val viewState = updateViewModel.viewState.collectAsStateValue() val githubLink = stringResource(R.string.github_link) val telegramLink = stringResource(R.string.telegram_link) + val checkingUpdates = stringResource(R.string.checking_updates) val isLatestVersion = stringResource(R.string.is_latest_version) + val comingSoon = stringResource(R.string.coming_soon) var currentVersion by remember { mutableStateOf("") } var pressAMP by remember { mutableStateOf(16f) } val animatedPress by animateFloatAsState( @@ -109,6 +111,11 @@ fun TipsAndSupport( pressAMP = 16f }, onTap = { + Toast.makeText( + context, + checkingUpdates, + Toast.LENGTH_SHORT + ).show() scope.launch { updateViewModel.dispatch( UpdateViewAction.CheckUpdate( @@ -187,7 +194,11 @@ fun TipsAndSupport( // Sponsor RoundIconButton(RoundIconButtonType.Sponsor( backgroundColor = MaterialTheme.colorScheme.tertiaryContainer alwaysLight true, - ) {}) + ) { + view.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP) + view.playSoundEffect(SoundEffectConstants.CLICK) + Toast.makeText(context, comingSoon, Toast.LENGTH_SHORT).show() + }) Spacer(modifier = Modifier.width(16.dp)) // Telegram @@ -223,7 +234,11 @@ fun TipsAndSupport( // License RoundIconButton(RoundIconButtonType.License( backgroundColor = MaterialTheme.colorScheme.secondaryContainer alwaysLight true, - ) {}) + ) { + view.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP) + view.playSoundEffect(SoundEffectConstants.CLICK) + Toast.makeText(context, comingSoon, Toast.LENGTH_SHORT).show() + }) } Spacer(modifier = Modifier.height(48.dp)) } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index e758b2d..246d0b2 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -115,5 +115,6 @@ 更新日志 更新 跳过这个版本 + 正在检查更新… 已是最新版本 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c0c34c3..c6cd0eb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -115,5 +115,6 @@ Change Log Update Skip This Version + Checking for updates… This is the latest version \ No newline at end of file