Skip to content

Commit

Permalink
Fix Detekt warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanklee committed Jun 15, 2024
1 parent 180e610 commit 82f4e00
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ jobs:
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assemble
- name: Lint with Detekt
run: ./gradlew detekt
- name: Run test with Gradle
run: ./gradlew test
6 changes: 5 additions & 1 deletion app/src/main/java/com/klee/sapio/ui/view/AboutActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ class AboutActivity : AppCompatActivity() {

mBinding = ActivityAboutBinding.inflate(layoutInflater)
mBinding.version.text = "v${BuildConfig.VERSION_NAME}"
mBinding.ratingRules.text = Html.fromHtml(getString(R.string.rating_rules, RATING_RULES), Html.FROM_HTML_MODE_COMPACT)
mBinding.ratingRules.text = Html.fromHtml(
getString(R.string.rating_rules, RATING_RULES),
Html.FROM_HTML_MODE_COMPACT
)

mBinding.ratingRules.movementMethod = LinkMovementMethod.getInstance()

setContentView(mBinding.root)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/klee/sapio/ui/view/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ class MainActivity : AppCompatActivity() {
R.id.about -> {
val intent = Intent(this@MainActivity, AboutActivity::class.java)
startActivity(intent)
return true
true
}
R.id.donate -> {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(DONATE_URL)))
return true
true
}
else -> super.onOptionsItemSelected(item)
}
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/java/com/klee/sapio/ui/view/WarningFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ class WarningFragment : Fragment() {
savedInstanceState: Bundle?
): View {
mBinding = FragmentWarningBinding.inflate(layoutInflater)
mBinding.reportAppDescription.text = Html.fromHtml(getString(R.string.warning_desc, AboutActivity.RATING_RULES), Html.FROM_HTML_MODE_LEGACY)
mBinding.reportAppDescription.text = Html.fromHtml(
getString(R.string.warning_desc, AboutActivity.RATING_RULES),
Html.FROM_HTML_MODE_LEGACY
)

mBinding.reportAppDescription.movementMethod = LinkMovementMethod.getInstance()

mBinding.proceedButton.setOnClickListener {
Expand Down

0 comments on commit 82f4e00

Please sign in to comment.