mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-07-03 14:06:34 +02:00
limit channel names to 11 characters
This commit is contained in:
@@ -316,7 +316,7 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
|
||||
val random = SecureRandom()
|
||||
val bytes = ByteArray(32)
|
||||
random.nextBytes(bytes)
|
||||
newSettings.name = newName
|
||||
newSettings.name = newName.take(11)
|
||||
newSettings.psk = ByteString.copyFrom(bytes)
|
||||
} else {
|
||||
debug("Switching back to default channel")
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="64dp"
|
||||
android:hint="@string/channel_name"
|
||||
app:counterEnabled="true"
|
||||
app:counterMaxLength="11"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
@@ -23,7 +25,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:digits="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890- "
|
||||
android:imeOptions="actionDone"
|
||||
android:maxLength="15"
|
||||
android:singleLine="true"
|
||||
android:text="@string/unset" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
Reference in New Issue
Block a user