diff options
author | Torsten Grote <t@grobox.de> | 2023-01-06 14:23:31 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2023-01-06 14:23:31 -0300 |
commit | d431660b840c37fe6ce80d0486f2ab07d1cbf80f (patch) | |
tree | 78e548992a63e67864c54297399bb5f0d0cf8575 | |
parent | a7852894a41025bfee59a66ca98c46c25bf38563 (diff) | |
download | taler-android-master.tar.gz taler-android-master.tar.bz2 taler-android-master.zip |
3 files changed, 6 insertions, 4 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/peer/OutgoingPullIntroComposable.kt b/wallet/src/main/java/net/taler/wallet/peer/OutgoingPullIntroComposable.kt index e66d628..9af3f5d 100644 --- a/wallet/src/main/java/net/taler/wallet/peer/OutgoingPullIntroComposable.kt +++ b/wallet/src/main/java/net/taler/wallet/peer/OutgoingPullIntroComposable.kt @@ -74,7 +74,7 @@ fun OutgoingPullIntroComposable( singleLine = true, value = subject, onValueChange = { input -> - if (input.length <= 100) + if (input.length <= MAX_LENGTH_SUBJECT) subject = input }, isError = subject.isBlank(), @@ -95,7 +95,7 @@ fun OutgoingPullIntroComposable( .fillMaxWidth() .padding(top = 5.dp, end = 16.dp), color = if (subject.isBlank()) colorResource(R.color.red) else Color.Unspecified, - text = stringResource(R.string.char_count, subject.length, 100), + text = stringResource(R.string.char_count, subject.length, MAX_LENGTH_SUBJECT), textAlign = TextAlign.End, ) Text( diff --git a/wallet/src/main/java/net/taler/wallet/peer/OutgoingPushIntroComposable.kt b/wallet/src/main/java/net/taler/wallet/peer/OutgoingPushIntroComposable.kt index 6815565..a77cfb7 100644 --- a/wallet/src/main/java/net/taler/wallet/peer/OutgoingPushIntroComposable.kt +++ b/wallet/src/main/java/net/taler/wallet/peer/OutgoingPushIntroComposable.kt @@ -77,7 +77,7 @@ fun OutgoingPushIntroComposable( singleLine = true, value = subject, onValueChange = { input -> - if (input.length <= 100) + if (input.length <= MAX_LENGTH_SUBJECT) subject = input }, isError = subject.isBlank(), @@ -95,7 +95,7 @@ fun OutgoingPushIntroComposable( .fillMaxWidth() .padding(top = 5.dp, end = 16.dp), color = if (subject.isBlank()) colorResource(R.color.red) else Color.Unspecified, - text = stringResource(R.string.char_count, subject.length, 100), + text = stringResource(R.string.char_count, subject.length, MAX_LENGTH_SUBJECT), textAlign = TextAlign.End, ) Text( diff --git a/wallet/src/main/java/net/taler/wallet/peer/PeerManager.kt b/wallet/src/main/java/net/taler/wallet/peer/PeerManager.kt index e49f368..270ca04 100644 --- a/wallet/src/main/java/net/taler/wallet/peer/PeerManager.kt +++ b/wallet/src/main/java/net/taler/wallet/peer/PeerManager.kt @@ -33,6 +33,8 @@ import net.taler.wallet.exchanges.ExchangeItem import org.json.JSONObject import java.util.concurrent.TimeUnit.DAYS +const val MAX_LENGTH_SUBJECT = 100 + class PeerManager( private val api: WalletBackendApi, private val scope: CoroutineScope, |