本文整理汇总了Java中org.telegram.tgnet.TLRPC.TL_messages_saveGif方法的典型用法代码示例。如果您正苦于以下问题:Java TLRPC.TL_messages_saveGif方法的具体用法?Java TLRPC.TL_messages_saveGif怎么用?Java TLRPC.TL_messages_saveGif使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.telegram.tgnet.TLRPC
的用法示例。
在下文中一共展示了TLRPC.TL_messages_saveGif方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveGif
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public MediaController.SearchImage saveGif(TLRPC.Document document) {
MediaController.SearchImage searchImage = new MediaController.SearchImage();
searchImage.type = 2;
searchImage.document = document;
searchImage.date = (int) (System.currentTimeMillis() / 1000);
searchImage.id = "" + searchImage.document.id;
ArrayList<MediaController.SearchImage> arrayList = new ArrayList<>();
arrayList.add(searchImage);
MessagesStorage.getInstance().putWebRecent(arrayList);
TLRPC.TL_messages_saveGif req = new TLRPC.TL_messages_saveGif();
req.id = new TLRPC.TL_inputDocument();
req.id.id = searchImage.document.id;
req.id.access_hash = searchImage.document.access_hash;
req.unsave = false;
ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
@Override
public void run(TLObject response, TLRPC.TL_error error) {
}
});
return searchImage;
}
示例2: removeRecentGif
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public static void removeRecentGif(final TLRPC.Document document) {
recentGifs.remove(document);
TLRPC.TL_messages_saveGif req = new TLRPC.TL_messages_saveGif();
req.id = new TLRPC.TL_inputDocument();
req.id.id = document.id;
req.id.access_hash = document.access_hash;
req.unsave = true;
ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
@Override
public void run(TLObject response, TLRPC.TL_error error) {
}
});
MessagesStorage.getInstance().getStorageQueue().postRunnable(new Runnable() {
@Override
public void run() {
try {
MessagesStorage.getInstance().getDatabase().executeFast("DELETE FROM web_recent_v3 WHERE id = '" + document.id + "'").stepThis().dispose();
} catch (Exception e) {
FileLog.e("tmessages", e);
}
}
});
}
示例3: saveGif
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void saveGif(TLRPC.Document document) {
TLRPC.TL_messages_saveGif req = new TLRPC.TL_messages_saveGif();
req.id = new TLRPC.TL_inputDocument();
req.id.id = document.id;
req.id.access_hash = document.access_hash;
req.unsave = false;
ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
@Override
public void run(TLObject response, TLRPC.TL_error error) {
}
});
}