mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-22 16:56:16 +00:00
Message now caches the message.
This commit is contained in:
parent
0cbdaed639
commit
54a3fad349
@ -7,6 +7,7 @@ import com.google.gson.JsonObject;
|
|||||||
public class Message {
|
public class Message {
|
||||||
protected static String tableName = "messages";
|
protected static String tableName = "messages";
|
||||||
private JsonObject json;
|
private JsonObject json;
|
||||||
|
private String message = null;
|
||||||
|
|
||||||
public Message(String json) {
|
public Message(String json) {
|
||||||
this.json = new JsonParser().parse(json).getAsJsonObject();
|
this.json = new JsonParser().parse(json).getAsJsonObject();
|
||||||
@ -18,6 +19,7 @@ public class Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
return json.getAsJsonPrimitive("message").getAsString();
|
if (message != null) return message;
|
||||||
|
return message = json.getAsJsonPrimitive("message").getAsString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user