diff --git a/app/src/main/java/com/nextcloud/talk/polls/adapters/PollResultViewHolder.kt b/app/src/main/java/com/nextcloud/talk/polls/adapters/PollResultViewHolder.kt index 8ec4bd447..e8da7ceee 100644 --- a/app/src/main/java/com/nextcloud/talk/polls/adapters/PollResultViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/polls/adapters/PollResultViewHolder.kt @@ -27,4 +27,4 @@ abstract class PollResultViewHolder( open val binding: ViewBinding ) : RecyclerView.ViewHolder(binding.root) { abstract fun bind(pollResultItem: PollResultItem, clickListener: PollResultItemClickListener) -} \ No newline at end of file +} diff --git a/app/src/main/java/com/nextcloud/talk/polls/repositories/PollRepositoryImpl.kt b/app/src/main/java/com/nextcloud/talk/polls/repositories/PollRepositoryImpl.kt index 20d924306..8de92deed 100644 --- a/app/src/main/java/com/nextcloud/talk/polls/repositories/PollRepositoryImpl.kt +++ b/app/src/main/java/com/nextcloud/talk/polls/repositories/PollRepositoryImpl.kt @@ -45,7 +45,7 @@ class PollRepositoryImpl(private val ncApi: NcApi, private val currentUserProvid options: List, resultMode: Int, maxVotes: - Int + Int ): Observable? { return ncApi.createPoll( credentials, diff --git a/app/src/main/java/com/nextcloud/talk/polls/ui/PollResultsFragment.kt b/app/src/main/java/com/nextcloud/talk/polls/ui/PollResultsFragment.kt index 64ed2d784..451a9058b 100644 --- a/app/src/main/java/com/nextcloud/talk/polls/ui/PollResultsFragment.kt +++ b/app/src/main/java/com/nextcloud/talk/polls/ui/PollResultsFragment.kt @@ -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)!! } diff --git a/app/src/main/java/com/nextcloud/talk/polls/ui/PollVoteFragment.kt b/app/src/main/java/com/nextcloud/talk/polls/ui/PollVoteFragment.kt index 78462aa90..c26290720 100644 --- a/app/src/main/java/com/nextcloud/talk/polls/ui/PollVoteFragment.kt +++ b/app/src/main/java/com/nextcloud/talk/polls/ui/PollVoteFragment.kt @@ -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) {