本文整理汇总了Java中org.telegram.tgnet.TLRPC.TL_inputChannelEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java TLRPC.TL_inputChannelEmpty方法的具体用法?Java TLRPC.TL_inputChannelEmpty怎么用?Java TLRPC.TL_inputChannelEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.telegram.tgnet.TLRPC
的用法示例。
在下文中一共展示了TLRPC.TL_inputChannelEmpty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInputChannel
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public static TLRPC.InputChannel getInputChannel(TLRPC.Chat chat) {
if (chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden) {
TLRPC.InputChannel inputChat = new TLRPC.TL_inputChannel();
inputChat.channel_id = chat.id;
inputChat.access_hash = chat.access_hash;
return inputChat;
} else {
return new TLRPC.TL_inputChannelEmpty();
}
}
示例2: ChannelCreateActivity
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public ChannelCreateActivity(Bundle args) {
super(args);
currentStep = args.getInt("step", 0);
if (currentStep == 0) {
avatarDrawable = new AvatarDrawable();
avatarUpdater = new AvatarUpdater();
TLRPC.TL_channels_checkUsername req = new TLRPC.TL_channels_checkUsername();
req.username = "1";
req.channel = new TLRPC.TL_inputChannelEmpty();
ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
@Override
public void run(TLObject response, final TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
canCreatePublic = error == null || !error.text.equals("CHANNELS_ADMIN_PUBLIC_TOO_MUCH");
}
});
}
});
} else {
if (currentStep == 1) {
canCreatePublic = args.getBoolean("canCreatePublic", true);
isPrivate = !canCreatePublic;
}
chatId = args.getInt("chat_id", 0);
}
}
示例3: ChannelCreateActivity
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public ChannelCreateActivity(Bundle args) {
super(args);
currentStep = args.getInt("step", 0);
if (currentStep == 0) {
avatarDrawable = new AvatarDrawable();
avatarUpdater = new AvatarUpdater();
TLRPC.TL_channels_checkUsername req = new TLRPC.TL_channels_checkUsername();
req.username = "1";
req.channel = new TLRPC.TL_inputChannelEmpty();
ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
@Override
public void run(TLObject response, final TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
canCreatePublic = error == null || !error.text.equals("CHANNELS_ADMIN_PUBLIC_TOO_MUCH");
}
});
}
});
} else {
if (currentStep == 1) {
canCreatePublic = args.getBoolean("canCreatePublic", true);
isPrivate = !canCreatePublic;
if (!canCreatePublic) {
loadAdminedChannels();
}
}
chatId = args.getInt("chat_id", 0);
}
}