本文整理汇总了Java中org.telegram.messenger.ChatObject.canWriteToChat方法的典型用法代码示例。如果您正苦于以下问题:Java ChatObject.canWriteToChat方法的具体用法?Java ChatObject.canWriteToChat怎么用?Java ChatObject.canWriteToChat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.telegram.messenger.ChatObject
的用法示例。
在下文中一共展示了ChatObject.canWriteToChat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateBottomOverlay
import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
public void updateBottomOverlay() {
if (bottomOverlayChatText == null) {
return;
}
if (currentChat != null) {
if (ChatObject.isChannel(currentChat) && !(currentChat instanceof TLRPC.TL_channelForbidden)) {
if (ChatObject.isNotInChat(currentChat)) {
bottomOverlayChatText.setText(LocaleController.getString("ChannelJoin", R.string.ChannelJoin));
} else {
if (!MessagesController.getInstance().isDialogMuted(dialog_id)) {
bottomOverlayChatText.setText(LocaleController.getString("ChannelMute", R.string.ChannelMute));
} else {
bottomOverlayChatText.setText(LocaleController.getString("ChannelUnmute", R.string.ChannelUnmute));
}
}
} else {
bottomOverlayChatText.setText(LocaleController.getString("DeleteThisGroup", R.string.DeleteThisGroup));
}
} else {
if (userBlocked) {
if (currentUser.bot) {
bottomOverlayChatText.setText(LocaleController.getString("BotUnblock", R.string.BotUnblock));
} else {
bottomOverlayChatText.setText(LocaleController.getString("Unblock", R.string.Unblock));
}
if (botButtons != null) {
botButtons = null;
if (chatActivityEnterView != null) {
if (replyingMessageObject != null && botReplyButtons == replyingMessageObject) {
botReplyButtons = null;
showReplyPanel(false, null, null, null, false, true);
}
chatActivityEnterView.setButtons(botButtons, false);
}
}
} else if (botUser != null && currentUser.bot) {
bottomOverlayChatText.setText(LocaleController.getString("BotStart", R.string.BotStart));
chatActivityEnterView.hidePopup(false);
if (getParentActivity() != null) {
AndroidUtilities.hideKeyboard(getParentActivity().getCurrentFocus());
}
} else {
bottomOverlayChatText.setText(LocaleController.getString("DeleteThisChat", R.string.DeleteThisChat));
}
}
if (searchItem != null && searchItem.getVisibility() == View.VISIBLE) {
searchContainer.setVisibility(View.VISIBLE);
bottomOverlayChat.setVisibility(View.INVISIBLE);
chatActivityEnterView.setFieldFocused(false);
chatActivityEnterView.setVisibility(View.INVISIBLE);
} else {
searchContainer.setVisibility(View.INVISIBLE);
if (currentChat != null && (ChatObject.isNotInChat(currentChat) || !ChatObject.canWriteToChat(currentChat)) ||
currentUser != null && (UserObject.isDeleted(currentUser) || userBlocked)) {
bottomOverlayChat.setVisibility(View.VISIBLE);
muteItem.setVisibility(View.GONE);
chatActivityEnterView.setFieldFocused(false);
chatActivityEnterView.setVisibility(View.INVISIBLE);
} else {
if (botUser != null && currentUser.bot) {
bottomOverlayChat.setVisibility(View.VISIBLE);
chatActivityEnterView.setVisibility(View.INVISIBLE);
} else {
chatActivityEnterView.setVisibility(View.VISIBLE);
bottomOverlayChat.setVisibility(View.INVISIBLE);
}
muteItem.setVisibility(View.VISIBLE);
}
}
checkRaiseSensors();
}