mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:02:10 +00:00
Don't set the room topic when creating a room if it is blank. (#3821)
* Don't set the room topic when creating a room if it is blank. Also fix the styling on the room name text field. * Snapshots * Add a test for the empty topic.
This commit is contained in:
@@ -256,7 +256,7 @@ class CreateRoomViewModel: CreateRoomViewModelType, CreateRoomViewModelProtocol
|
||||
}
|
||||
|
||||
switch await userSession.clientProxy.createRoom(name: createRoomParameters.name,
|
||||
topic: createRoomParameters.topic,
|
||||
topic: createRoomParameters.topic.isBlank ? nil : createRoomParameters.topic,
|
||||
isRoomPrivate: createRoomParameters.isRoomPrivate,
|
||||
// As of right now we don't want to make private rooms with the knock rule
|
||||
isKnockingOnly: createRoomParameters.isRoomPrivate ? false : createRoomParameters.isKnockingOnly,
|
||||
|
||||
@@ -70,6 +70,9 @@ struct CreateRoomScreen: View {
|
||||
text: roomNameBinding,
|
||||
prompt: Text(L10n.commonRoomNamePlaceholder).foregroundColor(.compound.textSecondary),
|
||||
axis: .horizontal)
|
||||
.font(.compound.bodyLG)
|
||||
.foregroundStyle(.compound.textPrimary)
|
||||
.tint(.compound.iconAccentTertiary)
|
||||
.focused($focus, equals: .name)
|
||||
.accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomName)
|
||||
.padding(.horizontal, ListRowPadding.horizontal)
|
||||
|
||||
Reference in New Issue
Block a user