mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-28 09:38:14 +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
|
@ -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,
|
||||
|
|
|
@ -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)!!
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue