mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-02 20:53:09 +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.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import org.json.JSONArray
|
||||
import javax.inject.Inject
|
||||
|
||||
@AutoInjector(NextcloudTalkApplication::class)
|
||||
@ -91,7 +92,8 @@ class MessageActionsDialog(
|
||||
initMenuItemTranslate(
|
||||
!message.isDeleted &&
|
||||
ChatMessage.MessageType.REGULAR_TEXT_MESSAGE == message.getCalculateMessageType() &&
|
||||
CapabilitiesUtilNew.isTranslationsSupported(user)
|
||||
CapabilitiesUtilNew.isTranslationsSupported(user) &&
|
||||
JSONArray(CapabilitiesUtilNew.getLanguages(user).toString()).length() > 0
|
||||
)
|
||||
initMenuReplyToMessage(message.replyable && hasChatPermission)
|
||||
initMenuReplyPrivately(
|
||||
|
Loading…
Reference in New Issue
Block a user