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


Java TLRPC.ChatFull方法代码示例

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


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

示例1: updateChannelAbout

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void updateChannelAbout(int chat_id, final String about, final TLRPC.ChatFull info) {
    if (info == null) {
        return;
    }
    TLRPC.TL_channels_editAbout req = new TLRPC.TL_channels_editAbout();
    req.channel = getInputChannel(chat_id);
    req.about = about;
    ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
        @Override
        public void run(TLObject response, TLRPC.TL_error error) {
            if (response instanceof TLRPC.TL_boolTrue) {
                AndroidUtilities.runOnUIThread(new Runnable() {
                    @Override
                    public void run() {
                        info.about = about;
                        MessagesStorage.getInstance().updateChatInfo(info, false);
                        NotificationCenter.getInstance().postNotificationName(NotificationCenter.chatInfoDidLoaded, info, 0, false, null);
                    }
                });
            }
        }
    }, ConnectionsManager.RequestFlagInvokeAfter);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:24,代码来源:MessagesController.java

示例2: didReceivedNotification

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
@Override
public void didReceivedNotification(int id, Object... args) {
    if (id == NotificationCenter.chatInfoDidLoaded) {
        TLRPC.ChatFull chatFull = (TLRPC.ChatFull) args[0];
        if (chatFull.id == chat_id) {
            info = chatFull;
            updateChatParticipants();
            updateRowsIds();
        }
    } if (id == NotificationCenter.updateInterfaces) {
        int mask = (Integer) args[0];
        if ((mask & MessagesController.UPDATE_MASK_AVATAR) != 0 || (mask & MessagesController.UPDATE_MASK_NAME) != 0 || (mask & MessagesController.UPDATE_MASK_STATUS) != 0) {
            if (listView != null) {
                int count = listView.getChildCount();
                for (int a = 0; a < count; a++) {
                    View child = listView.getChildAt(a);
                    if (child instanceof UserCell) {
                        ((UserCell) child).update(mask);
                    }
                }
            }
        }
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:25,代码来源:SetAdminsActivity.java

示例3: didReceivedNotification

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
@Override
public void didReceivedNotification(int id, Object... args) {
    if (id == NotificationCenter.chatInfoDidLoaded) {
        TLRPC.ChatFull chatFull = (TLRPC.ChatFull) args[0];
        if (chatFull.id == chatId) {
            if (info == null) {
                descriptionTextView.setText(chatFull.about);
            }
            info = chatFull;
            updateAdminCell();
            updateTypeCell();
        }
    } else if (id == NotificationCenter.updateInterfaces) {
        int updateMask = (Integer) args[0];
        if ((updateMask & MessagesController.UPDATE_MASK_CHANNEL) != 0) {
            updateTypeCell();
        }
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:20,代码来源:ChannelEditActivity.java

示例4: didReceivedNotification

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
@Override
public void didReceivedNotification(int id, Object... args) {
    if (id == NotificationCenter.chatInfoDidLoaded) {
        TLRPC.ChatFull info = (TLRPC.ChatFull) args[0];
        int guid = (int) args[1];
        if (info.id == chat_id && guid == classGuid) {
            invite = MessagesController.getInstance().getExportedInvite(chat_id);
            if (!(invite instanceof TLRPC.TL_chatInviteExported)) {
                generateLink(false);
            } else {
                loading = false;
                if (listAdapter != null) {
                    listAdapter.notifyDataSetChanged();
                }
            }
        }
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:19,代码来源:GroupInviteActivity.java

示例5: processChatInfo

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void processChatInfo(int chat_id, final TLRPC.ChatFull info, final ArrayList<TLRPC.User> usersArr, final boolean fromCache, boolean force, final boolean byChannelUsers, final MessageObject pinnedMessageObject) {
    if (fromCache && chat_id > 0 && !byChannelUsers) {
        loadFullChat(chat_id, 0, force);
    }
    if (info != null) {
        AndroidUtilities.runOnUIThread(new Runnable() {
            @Override
            public void run() {
                putUsers(usersArr, fromCache);
                NotificationCenter.getInstance().postNotificationName(NotificationCenter.chatInfoDidLoaded, info, 0, byChannelUsers, pinnedMessageObject);
            }
        });
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:15,代码来源:MessagesController.java

示例6: setChatInfo

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setChatInfo(TLRPC.ChatFull chatInfo) {
    info = chatInfo;
    if (info != null && info.migrated_from_chat_id != 0) {
        mergeDialogId = -info.migrated_from_chat_id;
    }
    fetchUsersFromChannelInfo();
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:8,代码来源:ProfileActivity.java

示例7: didReceivedNotification

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
@Override
public void didReceivedNotification(int id, Object... args) {
    if (id == NotificationCenter.chatInfoDidLoaded) {
        TLRPC.ChatFull chatFull = (TLRPC.ChatFull) args[0];
        if (chatFull.id == chatId) {
            invite = chatFull.exported_invite;
            updatePrivatePublic();
        }
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:11,代码来源:ChannelEditTypeActivity.java

示例8: setInfo

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setInfo(TLRPC.ChatFull chatFull) {
    if (chatFull != null) {
        if (chatFull.exported_invite instanceof TLRPC.TL_chatInviteExported) {
            invite = chatFull.exported_invite;
        } else {
            generateLink();
        }
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:10,代码来源:ChannelEditTypeActivity.java

示例9: didReceivedNotification

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
@Override
public void didReceivedNotification(int id, Object... args) {
    if (id == NotificationCenter.chatInfoDidLoaded) {
        TLRPC.ChatFull chatFull = (TLRPC.ChatFull) args[0];
        if (chatFull.id == chatId) {
            AndroidUtilities.runOnUIThread(new Runnable() {
                @Override
                public void run() {
                    getChannelParticipants(0, 200);
                }
            });
        }
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:15,代码来源:ChannelUsersActivity.java

示例10: getCurrentChatInfo

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public TLRPC.ChatFull getCurrentChatInfo() {
    return info;
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:4,代码来源:ChatActivity.java

示例11: setChatInfo

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setChatInfo(TLRPC.ChatFull chatInfo) {
    info = chatInfo;
    if (info != null && info.migrated_from_chat_id != 0) {
        mergeDialogId = -info.migrated_from_chat_id;
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:7,代码来源:MediaActivity.java

示例12: setChatInfo

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setChatInfo(TLRPC.ChatFull chatParticipants) {
    info = chatParticipants;
    updateChatParticipants();
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:5,代码来源:SetAdminsActivity.java

示例13: setInfo

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setInfo(TLRPC.ChatFull chatFull) {
    info = chatFull;
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:4,代码来源:ChannelEditActivity.java

示例14: updateSubtitle

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void updateSubtitle() {
    TLRPC.User user = parentFragment.getCurrentUser();
    TLRPC.Chat chat = parentFragment.getCurrentChat();
    CharSequence printString = MessagesController.getInstance().printingStrings.get(parentFragment.getDialogId());
    if (printString != null) {
        printString = TextUtils.replace(printString, new String[]{"..."}, new String[]{""});
    }
    if (printString == null || printString.length() == 0 || ChatObject.isChannel(chat) && !chat.megagroup) {
        setTypingAnimation(false);
        if (chat != null) {
            TLRPC.ChatFull info = parentFragment.getCurrentChatInfo();
            if (ChatObject.isChannel(chat)) {
                if (!chat.broadcast && !chat.megagroup && !(chat instanceof TLRPC.TL_channelForbidden)) {
                    subtitleTextView.setText(LocaleController.getString("ShowDiscussion", R.string.ShowDiscussion));
                    if (radioButton != null && radioButton.getVisibility() != VISIBLE) {
                        radioButton.setVisibility(View.VISIBLE);
                    }
                } else {
                    if (info != null && info.participants_count != 0) {
                        if (chat.megagroup && info.participants_count <= 200) {
                            if (onlineCount > 1 && info.participants_count != 0) {
                                subtitleTextView.setText(String.format("%s, %s", LocaleController.formatPluralString("Members", info.participants_count), LocaleController.formatPluralString("Online", onlineCount)));
                            } else {
                                subtitleTextView.setText(LocaleController.formatPluralString("Members", info.participants_count));
                            }
                        } else {
                            int result[] = new int[1];
                            String shortNumber = LocaleController.formatShortNumber(info.participants_count, result);
                            String text = LocaleController.formatPluralString("Members", result[0]).replace(String.format("%d", result[0]), shortNumber);
                            subtitleTextView.setText(text);
                        }
                    } else {
                        if (chat.megagroup) {
                            subtitleTextView.setText(LocaleController.getString("Loading", R.string.Loading).toLowerCase());
                        } else {
                            if ((chat.flags & TLRPC.CHAT_FLAG_IS_PUBLIC) != 0) {
                                subtitleTextView.setText(LocaleController.getString("ChannelPublic", R.string.ChannelPublic).toLowerCase());
                            } else {
                                subtitleTextView.setText(LocaleController.getString("ChannelPrivate", R.string.ChannelPrivate).toLowerCase());
                            }
                        }
                    }
                    if (radioButton != null && radioButton.getVisibility() != GONE) {
                        radioButton.setVisibility(View.GONE);
                    }
                }
            } else {
                if (ChatObject.isKickedFromChat(chat)) {
                    subtitleTextView.setText(LocaleController.getString("YouWereKicked", R.string.YouWereKicked));
                } else if (ChatObject.isLeftFromChat(chat)) {
                    subtitleTextView.setText(LocaleController.getString("YouLeft", R.string.YouLeft));
                } else {
                    int count = chat.participants_count;
                    if (info != null) {
                        count = info.participants.participants.size();
                    }
                    if (onlineCount > 1 && count != 0) {
                        subtitleTextView.setText(String.format("%s, %s", LocaleController.formatPluralString("Members", count), LocaleController.formatPluralString("Online", onlineCount)));
                    } else {
                        subtitleTextView.setText(LocaleController.formatPluralString("Members", count));
                    }
                }
            }
        } else if (user != null) {
            user = MessagesController.getInstance().getUser(user.id);
            String newStatus;
            if (user.id == 333000 || user.id == 777000) {
                newStatus = LocaleController.getString("ServiceNotifications", R.string.ServiceNotifications);
            } else if (user.bot) {
                newStatus = LocaleController.getString("Bot", R.string.Bot);
            } else {
                newStatus = LocaleController.formatUserStatus(user);
            }
            subtitleTextView.setText(newStatus);
        }
    } else {
        subtitleTextView.setText(printString);
        setTypingAnimation(true);
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:81,代码来源:ChatAvatarContainer.java


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