mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-03 05:03:04 +00:00
hide translation option of no target languages available
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
e4f94dbcfd
commit
cff28de8b1
@ -55,6 +55,7 @@ import io.reactivex.Observer
|
|||||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.disposables.Disposable
|
import io.reactivex.disposables.Disposable
|
||||||
import io.reactivex.schedulers.Schedulers
|
import io.reactivex.schedulers.Schedulers
|
||||||
|
import org.json.JSONArray
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@AutoInjector(NextcloudTalkApplication::class)
|
@AutoInjector(NextcloudTalkApplication::class)
|
||||||
@ -91,7 +92,8 @@ class MessageActionsDialog(
|
|||||||
initMenuItemTranslate(
|
initMenuItemTranslate(
|
||||||
!message.isDeleted &&
|
!message.isDeleted &&
|
||||||
ChatMessage.MessageType.REGULAR_TEXT_MESSAGE == message.getCalculateMessageType() &&
|
ChatMessage.MessageType.REGULAR_TEXT_MESSAGE == message.getCalculateMessageType() &&
|
||||||
CapabilitiesUtilNew.isTranslationsSupported(user)
|
CapabilitiesUtilNew.isTranslationsSupported(user) &&
|
||||||
|
JSONArray(CapabilitiesUtilNew.getLanguages(user).toString()).length() > 0
|
||||||
)
|
)
|
||||||
initMenuReplyToMessage(message.replyable && hasChatPermission)
|
initMenuReplyToMessage(message.replyable && hasChatPermission)
|
||||||
initMenuReplyPrivately(
|
initMenuReplyPrivately(
|
||||||
|
Loading…
Reference in New Issue
Block a user