mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-19 20:59:00 +03:00
Code review fixes.
This commit is contained in:
parent
b8ca520552
commit
cbe07c4aee
3 changed files with 3 additions and 5 deletions
vector/src/main/java/im/vector/app/features
|
@ -504,7 +504,7 @@ class DefaultNavigator @Inject constructor(
|
|||
override fun openCreatePoll(context: Context, roomId: String) {
|
||||
val intent = CreatePollActivity.getIntent(
|
||||
context,
|
||||
CreatePollArgs(roomId = roomId, minOptionsCount = CreatePollViewModel.MIN_OPTIONS_COUNT)
|
||||
CreatePollArgs(roomId = roomId)
|
||||
)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import javax.inject.Inject
|
|||
@Parcelize
|
||||
data class CreatePollArgs(
|
||||
val roomId: String,
|
||||
val minOptionsCount: Int
|
||||
) : Parcelable
|
||||
|
||||
class CreatePollFragment @Inject constructor(
|
||||
|
|
|
@ -21,14 +21,13 @@ import com.airbnb.mvrx.MavericksState
|
|||
data class CreatePollViewState(
|
||||
val roomId: String,
|
||||
val question: String = "",
|
||||
val options: List<String> = emptyList(),
|
||||
val options: List<String> = List(CreatePollViewModel.MIN_OPTIONS_COUNT) { "" },
|
||||
val canCreatePoll: Boolean = false,
|
||||
val canAddMoreOptions: Boolean = true
|
||||
) : MavericksState {
|
||||
|
||||
constructor(args: CreatePollArgs) : this(
|
||||
roomId = args.roomId,
|
||||
options = List(args.minOptionsCount) { "" }
|
||||
roomId = args.roomId
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue