mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 14:05:40 +03:00
solve klint warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
4c6e4b1c4c
commit
1b13812202
4 changed files with 14 additions and 8 deletions
|
@ -27,4 +27,4 @@ abstract class PollResultViewHolder(
|
||||||
open val binding: ViewBinding
|
open val binding: ViewBinding
|
||||||
) : RecyclerView.ViewHolder(binding.root) {
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
abstract fun bind(pollResultItem: PollResultItem, clickListener: PollResultItemClickListener)
|
abstract fun bind(pollResultItem: PollResultItem, clickListener: PollResultItemClickListener)
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ class PollRepositoryImpl(private val ncApi: NcApi, private val currentUserProvid
|
||||||
options: List<String>,
|
options: List<String>,
|
||||||
resultMode: Int,
|
resultMode: Int,
|
||||||
maxVotes:
|
maxVotes:
|
||||||
Int
|
Int
|
||||||
): Observable<Poll>? {
|
): Observable<Poll>? {
|
||||||
return ncApi.createPoll(
|
return ncApi.createPoll(
|
||||||
credentials,
|
credentials,
|
||||||
|
|
|
@ -61,8 +61,10 @@ class PollResultsFragment : Fragment(), PollResultItemClickListener {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
NextcloudTalkApplication.sharedApplication!!.componentApplication.inject(this)
|
NextcloudTalkApplication.sharedApplication!!.componentApplication.inject(this)
|
||||||
viewModel = ViewModelProvider(this, viewModelFactory)[PollResultsViewModel::class.java]
|
viewModel = ViewModelProvider(this, viewModelFactory)[PollResultsViewModel::class.java]
|
||||||
parentViewModel = ViewModelProvider(requireParentFragment(), viewModelFactory)[PollMainViewModel::class
|
parentViewModel = ViewModelProvider(requireParentFragment(), viewModelFactory)[
|
||||||
.java]
|
PollMainViewModel::class
|
||||||
|
.java
|
||||||
|
]
|
||||||
|
|
||||||
user = arguments?.getParcelable(KEY_USER_ENTITY)!!
|
user = arguments?.getParcelable(KEY_USER_ENTITY)!!
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,10 @@ class PollVoteFragment : Fragment() {
|
||||||
NextcloudTalkApplication.sharedApplication!!.componentApplication.inject(this)
|
NextcloudTalkApplication.sharedApplication!!.componentApplication.inject(this)
|
||||||
viewModel = ViewModelProvider(this, viewModelFactory)[PollVoteViewModel::class.java]
|
viewModel = ViewModelProvider(this, viewModelFactory)[PollVoteViewModel::class.java]
|
||||||
|
|
||||||
parentViewModel = ViewModelProvider(requireParentFragment(), viewModelFactory)[PollMainViewModel::class
|
parentViewModel = ViewModelProvider(requireParentFragment(), viewModelFactory)[
|
||||||
.java]
|
PollMainViewModel::class
|
||||||
|
.java
|
||||||
|
]
|
||||||
|
|
||||||
roomToken = arguments?.getString(KEY_ROOM_TOKEN)!!
|
roomToken = arguments?.getString(KEY_ROOM_TOKEN)!!
|
||||||
pollId = arguments?.getString(KEY_POLL_ID)!!
|
pollId = arguments?.getString(KEY_POLL_ID)!!
|
||||||
|
@ -164,8 +166,10 @@ class PollVoteFragment : Fragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun areSelectedOptionsDifferentToVotedOptions(): Boolean {
|
private fun areSelectedOptionsDifferentToVotedOptions(): Boolean {
|
||||||
return !(viewModel.votedOptions.containsAll(viewModel.selectedOptions) &&
|
return !(
|
||||||
viewModel.selectedOptions.containsAll(viewModel.votedOptions))
|
viewModel.votedOptions.containsAll(viewModel.selectedOptions) &&
|
||||||
|
viewModel.selectedOptions.containsAll(viewModel.votedOptions)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun makeOptionBoldIfSelfVoted(button: CompoundButton, poll: Poll, index: Int) {
|
private fun makeOptionBoldIfSelfVoted(button: CompoundButton, poll: Poll, index: Int) {
|
||||||
|
|
Loading…
Reference in a new issue