Skip to content

Commit

Permalink
Update help screen (closes #2859)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Sep 18, 2023
1 parent ed0e5bd commit d9cde75
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/src/main/java/net/bible/service/common/CommonUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -993,12 +993,12 @@ object CommonUtils : CommonUtilsBase() {
val buy = app.getString(R.string.buy_development)
val support = app.getString(R.string.buy_development2)
val heartIcon = ImageSpan(getTintedDrawable(R.drawable.baseline_attach_money_24))
val buyMessage = "<b>$support</b><br><br><a href=\"$buyDevelopmentLink\">$buy</a>"
val buyMessage = "<b>$support</b>: <a href=\"$buyDevelopmentLink\">$buy</a>"
val iconStr = SpannableString("* ")
iconStr.setSpan(heartIcon, 0, 1, SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE)
val spannedBuy = TextUtils.concat(iconStr, htmlToSpan(buyMessage))

var htmlMessage = "<br><br>"
var htmlMessage = ""

for(helpItem in help) {
val videoMessage =
Expand All @@ -1009,10 +1009,8 @@ object CommonUtils : CommonUtilsBase() {
val helpText = app.getString(helpItem.text).replace("\n", "<br>")
htmlMessage += "<b>${app.getString(helpItem.title)}</b><br>$videoMessage$helpText<br><br>"
}
if(showVersion)
htmlMessage += "<i>$versionMsg</i>"

val spanned = TextUtils.concat(spannedBuy, htmlToSpan(htmlMessage))
val spanned = TextUtils.concat(htmlToSpan(htmlMessage), spannedBuy, if(showVersion) htmlToSpan("<br><br><i>$versionMsg</i>") else "")

val d = AlertDialog.Builder(callingActivity)
.setTitle(R.string.help)
Expand Down

0 comments on commit d9cde75

Please sign in to comment.