fix to open poll dialog

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2023-04-03 10:25:43 +02:00
parent 52266a5632
commit 0b0387115e
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B
2 changed files with 4 additions and 4 deletions

View file

@ -28,10 +28,10 @@ import androidx.core.content.ContextCompat
import autodagger.AutoInjector import autodagger.AutoInjector
import coil.load import coil.load
import com.nextcloud.talk.R import com.nextcloud.talk.R
import com.nextcloud.talk.activities.MainActivity
import com.nextcloud.talk.api.NcApi import com.nextcloud.talk.api.NcApi
import com.nextcloud.talk.application.NextcloudTalkApplication import com.nextcloud.talk.application.NextcloudTalkApplication
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
import com.nextcloud.talk.chat.ChatActivity
import com.nextcloud.talk.databinding.ItemCustomIncomingPollMessageBinding import com.nextcloud.talk.databinding.ItemCustomIncomingPollMessageBinding
import com.nextcloud.talk.extensions.loadBotsAvatar import com.nextcloud.talk.extensions.loadBotsAvatar
import com.nextcloud.talk.extensions.loadChangelogBotAvatar import com.nextcloud.talk.extensions.loadChangelogBotAvatar
@ -136,7 +136,7 @@ class IncomingPollMessageViewHolder(incomingView: View, payload: Any) : MessageH
pollName pollName
) )
pollVoteDialog.show( pollVoteDialog.show(
(binding.messagePollIcon.context as MainActivity).supportFragmentManager, (binding.messagePollIcon.context as ChatActivity).supportFragmentManager,
TAG TAG
) )
} }

View file

@ -29,10 +29,10 @@ import androidx.appcompat.content.res.AppCompatResources
import autodagger.AutoInjector import autodagger.AutoInjector
import coil.load import coil.load
import com.nextcloud.talk.R import com.nextcloud.talk.R
import com.nextcloud.talk.activities.MainActivity
import com.nextcloud.talk.api.NcApi import com.nextcloud.talk.api.NcApi
import com.nextcloud.talk.application.NextcloudTalkApplication import com.nextcloud.talk.application.NextcloudTalkApplication
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
import com.nextcloud.talk.chat.ChatActivity
import com.nextcloud.talk.databinding.ItemCustomOutcomingPollMessageBinding import com.nextcloud.talk.databinding.ItemCustomOutcomingPollMessageBinding
import com.nextcloud.talk.models.json.chat.ChatMessage import com.nextcloud.talk.models.json.chat.ChatMessage
import com.nextcloud.talk.models.json.chat.ReadStatus import com.nextcloud.talk.models.json.chat.ReadStatus
@ -160,7 +160,7 @@ class OutcomingPollMessageViewHolder(outcomingView: View, payload: Any) : Messag
pollName pollName
) )
pollVoteDialog.show( pollVoteDialog.show(
(binding.messagePollIcon.context as MainActivity).supportFragmentManager, (binding.messagePollIcon.context as ChatActivity).supportFragmentManager,
TAG TAG
) )
} }