commit 4c27688126ad528f892a9e7ef958a7a3c6b8371c
parent ef64447a860b1db32b5decff71038733ed89f74e
Author: Jan Dankert <devnull@localhost>
Date: Wed, 25 Jan 2012 23:21:03 +0100
Posts nun auch mit Datum...
Diffstat:
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/de/mtbnews/android/tapatalk/TapatalkClient.java b/src/de/mtbnews/android/tapatalk/TapatalkClient.java
@@ -104,9 +104,9 @@ public class TapatalkClient
for (Object o1 : (Object[]) map.get("posts"))
{
Map postMap = (Map) o1;
- Post post = new Post(new String((byte[]) postMap
- .get("post_title")), new String((byte[]) postMap
- .get("post_content")));
+ Post post = new Post((Date) postMap.get("post_time"),
+ new String((byte[]) postMap.get("post_title")),
+ new String((byte[]) postMap.get("post_content")));
posts.add(post);
}
@@ -358,8 +358,8 @@ public class TapatalkClient
list.add(forum);
forum.subOnly = (Boolean) map.get("sub_only");
if (map.containsKey(childName))
- forum.subForen = createSubForen(castToMapArray((Object[])map.get(childName)),
- childName);
+ forum.subForen = createSubForen(castToMapArray((Object[]) map
+ .get(childName)), childName);
}
return list;
diff --git a/src/de/mtbnews/android/tapatalk/wrapper/Post.java b/src/de/mtbnews/android/tapatalk/wrapper/Post.java
@@ -5,6 +5,7 @@ import java.util.Date;
public class Post implements ListEntry
{
+ private Date time;
private String title;
private String content;
@@ -12,9 +13,10 @@ public class Post implements ListEntry
* @param title
* @param content
*/
- public Post(String title, String content)
+ public Post(Date time, String title, String content)
{
super();
+ this.time = time;
this.title = title;
this.content = content;
}
@@ -38,7 +40,7 @@ public class Post implements ListEntry
@Override
public Date getDate()
{
- return null;
+ return time;
}
}