Skip to content

Commit

Permalink
Issue #57
Browse files Browse the repository at this point in the history
  • Loading branch information
swentel committed Sep 8, 2018
1 parent 84408cd commit 9e5bed6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/src/main/assets/changelog
Expand Up @@ -6,6 +6,7 @@ Icons from <a href="https://material.io/tools/icons/">Material Design</a> and <a
<h2>Changelog</h2>
<h3>10/09/2018 - 0.14</h3>
<ul>
<li>Cleaner date formatting in timeline</li>
<li>Check required fields on post types</li>
<li>Cleaner positioning of 'new'</li>
<li>Send post status (published or draft)</li>
Expand Down
Expand Up @@ -31,7 +31,6 @@
import com.indieweb.indigenous.micropub.post.RsvpActivity;
import com.indieweb.indigenous.model.TimelineItem;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
Expand Down Expand Up @@ -137,14 +136,13 @@ public View getView(int position, View convertView, ViewGroup parent) {
}

// Published.
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'kk:mm:ssZ");
SimpleDateFormat formatIn = new SimpleDateFormat("yyyy-MM-dd'T'kk:mm:ssZ");
SimpleDateFormat formatOut = new SimpleDateFormat("dd MMM yyyy kk:mm");
Date result;
try {
// TODO use format (cf event)
result = df.parse(item.getPublished());
result = formatIn.parse(item.getPublished());
holder.published.setVisibility(View.VISIBLE);
String published = result.toString();
holder.published.setText(published);
holder.published.setText(formatOut.format(result));
} catch (ParseException ignored) {
holder.published.setVisibility(View.GONE);
}
Expand Down Expand Up @@ -173,7 +171,6 @@ public View getView(int position, View convertView, ViewGroup parent) {
holder.name.setVisibility(View.GONE);
}

// TODO we should probably create subtype classes per 'type'
String ContextData = "";
if (item.getType().equals("bookmark-of") || item.getType().equals("in-reply-to") || item.getType().equals("like-of") || item.getType().equals("checkin")) {
String ContextText = "";
Expand Down

0 comments on commit 9e5bed6

Please sign in to comment.