aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wallet/src/main/java/net/taler/wallet/peer/OutgoingPullIntroComposable.kt4
-rw-r--r--wallet/src/main/java/net/taler/wallet/peer/OutgoingPushIntroComposable.kt4
-rw-r--r--wallet/src/main/java/net/taler/wallet/peer/PeerManager.kt2
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,