solve klint warnings

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-07-01 12:16:10 +02:00 committed by Andy Scherzinger (Rebase PR Action)
parent 4c6e4b1c4c
commit 1b13812202
4 changed files with 14 additions and 8 deletions

View file

@ -27,4 +27,4 @@ abstract class PollResultViewHolder(
open val binding: ViewBinding
) : RecyclerView.ViewHolder(binding.root) {
abstract fun bind(pollResultItem: PollResultItem, clickListener: PollResultItemClickListener)
}
}

View file

@ -45,7 +45,7 @@ class PollRepositoryImpl(private val ncApi: NcApi, private val currentUserProvid
options: List<String>,
resultMode: Int,
maxVotes:
Int
Int
): Observable<Poll>? {
return ncApi.createPoll(
credentials,

View file

@ -61,8 +61,10 @@ class PollResultsFragment : Fragment(), PollResultItemClickListener {
super.onCreate(savedInstanceState)
NextcloudTalkApplication.sharedApplication!!.componentApplication.inject(this)
viewModel = ViewModelProvider(this, viewModelFactory)[PollResultsViewModel::class.java]
parentViewModel = ViewModelProvider(requireParentFragment(), viewModelFactory)[PollMainViewModel::class
.java]
parentViewModel = ViewModelProvider(requireParentFragment(), viewModelFactory)[
PollMainViewModel::class
.java
]
user = arguments?.getParcelable(KEY_USER_ENTITY)!!
}

View file

@ -64,8 +64,10 @@ class PollVoteFragment : Fragment() {
NextcloudTalkApplication.sharedApplication!!.componentApplication.inject(this)
viewModel = ViewModelProvider(this, viewModelFactory)[PollVoteViewModel::class.java]
parentViewModel = ViewModelProvider(requireParentFragment(), viewModelFactory)[PollMainViewModel::class
.java]
parentViewModel = ViewModelProvider(requireParentFragment(), viewModelFactory)[
PollMainViewModel::class
.java
]
roomToken = arguments?.getString(KEY_ROOM_TOKEN)!!
pollId = arguments?.getString(KEY_POLL_ID)!!
@ -164,8 +166,10 @@ class PollVoteFragment : Fragment() {
}
private fun areSelectedOptionsDifferentToVotedOptions(): Boolean {
return !(viewModel.votedOptions.containsAll(viewModel.selectedOptions) &&
viewModel.selectedOptions.containsAll(viewModel.votedOptions))
return !(
viewModel.votedOptions.containsAll(viewModel.selectedOptions) &&
viewModel.selectedOptions.containsAll(viewModel.votedOptions)
)
}
private fun makeOptionBoldIfSelfVoted(button: CompoundButton, poll: Poll, index: Int) {