当前位置: 首页>>代码示例>>Java>>正文


Java ChatObject.isNotInChat方法代码示例

本文整理汇总了Java中org.telegram.messenger.ChatObject.isNotInChat方法的典型用法代码示例。如果您正苦于以下问题:Java ChatObject.isNotInChat方法的具体用法?Java ChatObject.isNotInChat怎么用?Java ChatObject.isNotInChat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.telegram.messenger.ChatObject的用法示例。


在下文中一共展示了ChatObject.isNotInChat方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ShareDialogsAdapter

import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
public ShareDialogsAdapter(Context context) {
    this.context = context;
    for (int a = 0; a < MessagesController.getInstance().dialogsServerOnly.size(); a++) {
        TLRPC.TL_dialog dialog = MessagesController.getInstance().dialogsServerOnly.get(a);
        int lower_id = (int) dialog.id;
        int high_id = (int) (dialog.id >> 32);
        if (lower_id != 0 && high_id != 1) {
            if (lower_id > 0) {
                dialogs.add(dialog);
            } else {
                TLRPC.Chat chat = MessagesController.getInstance().getChat(-lower_id);
                if (!(chat == null || ChatObject.isNotInChat(chat) || ChatObject.isChannel(chat) && !chat.creator && !chat.editor && !chat.megagroup)) {
                    dialogs.add(dialog);
                }
            }
        }
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:19,代码来源:ShareAlert.java

示例2: ShareDialogsAdapter

import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
public ShareDialogsAdapter(Context context) {
    mContext = context;
    for (int a = 0; a < MessagesController.getInstance().dialogsServerOnly.size(); a++) {
        TLRPC.TL_dialog dialog = MessagesController.getInstance().dialogsServerOnly.get(a);
        int lower_id = (int) dialog.id;
        int high_id = (int) (dialog.id >> 32);
        if (lower_id != 0 && high_id != 1) {
            if (lower_id > 0) {
                dialogs.add(dialog);
            } else {
                TLRPC.Chat chat = MessagesController.getInstance().getChat(-lower_id);
                if (!(chat == null || ChatObject.isNotInChat(chat) || ChatObject.isChannel(chat) && !chat.creator && !chat.editor && !chat.megagroup)) {
                    dialogs.add(dialog);
                }
            }
        }
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:19,代码来源:ShareFrameLayout.java

示例3: getSwipeDirs

import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
@Override
public int getSwipeDirs(RecyclerView recyclerView,RecyclerView.ViewHolder viewHolder) {
    if (viewHolder.itemView instanceof ChatMessageCell) {
        int type = getMessageType(message);
        boolean allowChatActions = true;
        message = ((ChatMessageCell) viewHolder.itemView).getMessageObject();
        boolean isVoiceMsg = MessageObject.isVoiceDocument(this.message.getDocument());
        if ((currentEncryptedChat != null && AndroidUtilities.getPeerLayerVersion(ChatActivity.this.currentEncryptedChat.layer) < 46) || ((type == ChatActivity.attach_gallery && this.message.getDialogId() == ChatActivity.this.mergeDialogId) || ((ChatActivity.this.currentEncryptedChat == null && this.message.getId() < 0) || ChatActivity.this.isBroadcast || ((ChatActivity.this.currentChat != null && (ChatObject.isNotInChat(ChatActivity.this.currentChat) || !(!ChatObject.isChannel(ChatActivity.this.currentChat) || ChatActivity.this.currentChat.creator || ChatActivity.this.currentChat.editor || ChatActivity.this.currentChat.megagroup))) || isVoiceMsg)))) {
            allowChatActions = false;
        }
        if (allowChatActions) {
            ChatActivity.this.chatListView.cancelClickRunnables(true);
            return super.getSwipeDirs(recyclerView, viewHolder);
        }
    }
    return ChatActivity.attach_photo;
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:18,代码来源:ChatActivity.java

示例4: generateShareList

import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
private void generateShareList(ArrayList<TLRPC.TL_dialog> share_list) {
    for (int a = 0; a < share_list.size(); a++) {
        TLRPC.TL_dialog dialog = share_list.get(a);
        if (favsFirst && Favourite.isFavourite(dialog.id)) {
            continue;
        }
        int lower_id = (int) dialog.id;
        int high_id = (int) (dialog.id >> 32);
        if (lower_id != 0 && high_id != 1) {
            if (lower_id > 0) {
                dialogs.add(dialog);
            } else {
                TLRPC.Chat chat = MessagesController.getInstance().getChat(-lower_id);
                if (!(chat == null || ChatObject.isNotInChat(chat) || ChatObject.isChannel(chat) && !chat.creator && !chat.editor && !chat.megagroup)) {
                    dialogs.add(dialog);
                }
            }
        }
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:21,代码来源:ShareAlert.java

示例5: checkActionBarMenu

import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
private void checkActionBarMenu() {
    if (currentEncryptedChat != null && !(currentEncryptedChat instanceof TLRPC.TL_encryptedChat) ||
            currentChat != null && ChatObject.isNotInChat(currentChat) ||
            currentUser != null && UserObject.isDeleted(currentUser)) {
        if (timeItem2 != null) {
            timeItem2.setVisibility(View.GONE);
        }
        if (avatarContainer != null) {
            avatarContainer.hideTimeItem();
        }
    } else {
        if (timeItem2 != null) {
            timeItem2.setVisibility(View.VISIBLE);
        }
        if (avatarContainer != null) {
            avatarContainer.showTimeItem();
        }
    }
    if (avatarContainer != null && currentEncryptedChat != null) {
        avatarContainer.setTime(currentEncryptedChat.ttl);
    }
    checkAndUpdateAvatar();
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:24,代码来源:ChatActivity.java

示例6: fetchDialogs

import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
public void fetchDialogs() {
    dialogs.clear();
    for (int a = 0; a < MessagesController.getInstance().dialogsForward.size(); a++) {
        TLRPC.TL_dialog dialog = MessagesController.getInstance().dialogsForward.get(a);
        int lower_id = (int) dialog.id;
        int high_id = (int) (dialog.id >> 32);
        if (lower_id != 0 && high_id != 1) {
            if (lower_id > 0) {
                dialogs.add(dialog);
            } else {
                TLRPC.Chat chat = MessagesController.getInstance().getChat(-lower_id);
                if (!(chat == null || ChatObject.isNotInChat(chat) || ChatObject.isChannel(chat) && !chat.creator && (chat.admin_rights == null || !chat.admin_rights.post_messages) && !chat.megagroup)) {
                    dialogs.add(dialog);
                }
            }
        }
    }
    notifyDataSetChanged();
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:20,代码来源:ShareAlert.java

示例7: checkActionBarMenu

import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
public void checkActionBarMenu() {
    if (currentEncryptedChat != null && !(currentEncryptedChat instanceof TLRPC.TL_encryptedChat) ||
            currentChat != null && ChatObject.isNotInChat(currentChat) ||
            currentUser != null && UserObject.isDeleted(currentUser)) {
        if (menuItem != null) {
            menuItem.setVisibility(View.GONE);
        }
        if (timeItem2 != null) {
            timeItem2.setVisibility(View.GONE);
        }
        if (avatarContainer != null) {
            avatarContainer.hideTimeItem();
        }
    } else {
        if (menuItem != null) {
            menuItem.setVisibility(View.VISIBLE);
        }
        if (timeItem2 != null) {
            timeItem2.setVisibility(View.VISIBLE);
        }
        if (avatarContainer != null) {
            avatarContainer.showTimeItem();
        }
    }
    if (avatarContainer != null && currentEncryptedChat != null) {
        avatarContainer.setTime(currentEncryptedChat.ttl);
    }
    checkAndUpdateAvatar();
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:30,代码来源:ChatActivity.java

示例8: checkActionBarMenu

import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
private void checkActionBarMenu() {
    if (currentEncryptedChat != null && !(currentEncryptedChat instanceof TLRPC.TL_encryptedChat) ||
            currentChat != null && ChatObject.isNotInChat(currentChat) ||
            currentUser != null && UserObject.isDeleted(currentUser)) {
        if (menuItem != null) {
            menuItem.setVisibility(View.GONE);
        }
        if (timeItem2 != null) {
            timeItem2.setVisibility(View.GONE);
        }
        if (avatarContainer != null) {
            avatarContainer.hideTimeItem();
        }
    } else {
        if (menuItem != null) {
            menuItem.setVisibility(View.VISIBLE);
        }
        if (timeItem2 != null) {
            timeItem2.setVisibility(View.VISIBLE);
        }
        if (avatarContainer != null) {
            avatarContainer.showTimeItem();
        }
    }
    if (avatarContainer != null && currentEncryptedChat != null) {
        avatarContainer.setTime(currentEncryptedChat.ttl);
    }
    checkAndUpdateAvatar();
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:30,代码来源:ChatActivity.java

示例9: 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();
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:73,代码来源:ChatActivity.java

示例10: ShareDialogsAdapter

import org.telegram.messenger.ChatObject; //导入方法依赖的package包/类
public ShareDialogsAdapter(Context context) {
    this.context = context;
    //Telegram
    if (favsFirst) {
        for (int a = 0; a < MessagesController.getInstance().dialogsFavs.size(); a++) {
            TLRPC.TL_dialog dialog = MessagesController.getInstance().dialogsFavs.get(a);
            int lower_id = (int) dialog.id;
            int high_id = (int) (dialog.id >> 32);
            if (lower_id != 0 && high_id != 1) {
                if (lower_id > 0) {
                    dialogs.add(dialog);
                } else {
                    TLRPC.Chat chat = MessagesController.getInstance().getChat(-lower_id);
                    if (!(chat == null || ChatObject.isNotInChat(chat) || ChatObject.isChannel(chat) && !chat.creator && !chat.editor && !chat.megagroup)) {
                        dialogs.add(dialog);
                    }
                }
            }
        }
    }
    switch (index_share_type)
    {
        case ALL:
            generateShareList(MessagesController.getInstance().dialogsServerOnly);
            break;

        case USER:
            generateShareList(MessagesController.getInstance().dialogsUsers);
            break;

        case GROUP:
            generateShareList(MessagesController.getInstance().dialogsGroups);
            break;

        case SUPERGROUP:
            generateShareList(MessagesController.getInstance().dialogsMegaGroups);
            break;

        case CHANNEL:
            generateShareList(MessagesController.getInstance().dialogsChannels);
            break;

        case BOT:
            generateShareList(MessagesController.getInstance().dialogsBots);
            break;

        case FAV:
            generateShareList(MessagesController.getInstance().dialogsFavs);
            break;
    }

}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:53,代码来源:ShareAlert.java


注:本文中的org.telegram.messenger.ChatObject.isNotInChat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。