本文整理汇总了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);
}
示例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);
}
}
}
}
}
}
示例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();
}
}
}
示例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();
}
}
}
}
}
示例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);
}
});
}
}
示例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();
}
示例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();
}
}
}
示例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();
}
}
}
示例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);
}
});
}
}
}
示例10: getCurrentChatInfo
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public TLRPC.ChatFull getCurrentChatInfo() {
return info;
}
示例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;
}
}
示例12: setChatInfo
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setChatInfo(TLRPC.ChatFull chatParticipants) {
info = chatParticipants;
updateChatParticipants();
}
示例13: setInfo
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void setInfo(TLRPC.ChatFull chatFull) {
info = chatFull;
}
示例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);
}
}