Skip to content

Commit

Permalink
Change update time view
Browse files Browse the repository at this point in the history
  • Loading branch information
vladholubiev committed Feb 4, 2015
1 parent 79b87fe commit 6c77089
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/ua/samosfator/moduleok/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ public static String getVersion() {
}

public static String getFormattedUpdateTime() {
DateFormat dateFormat = new SimpleDateFormat("kk:mm dd.MM.yy ", Locale.getDefault());
if (updateTime == null) return "asdasdasdasdasd";
String formatTemplate = "dd.MM.yy " + mContext.getString(R.string.date_hour_divider) + " kk:mm";
DateFormat dateFormat = new SimpleDateFormat(formatTemplate, Locale.getDefault());
if (updateTime == null) return "";
return dateFormat.format(updateTime);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private boolean isFirstSectionAndLoggedIn(int position) {
}

private boolean isLastSectionAndLoggedOut(int position) {
return !Auth.isLoggedIn() && position == (data.size() - 1);
return !Auth.isLoggedIn() && position == SectionsEnum.LOG_IN.INDEX;
}

private void doHighlightSection(SectionViewHolder holder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void initSections() {
SectionDrawer versionSection = new SectionDrawer("v." + App.getVersion(), R.drawable.ic_information_grey600_24dp);
mSections.add(versionSection);

SectionDrawer feedbackSection = new SectionDrawer(App.getContext().getString(R.string.feedback_section), R.drawable.ic_help_circle_grey600_24dp);
SectionDrawer feedbackSection = new SectionDrawer(App.getContext().getString(R.string.feedback_section), R.drawable.ic_help_circle_grey600_24dp);
mSections.add(feedbackSection);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private boolean semesterHasData(Element semesterElement) {
}

public Semester get(int index) {
assert index <= 1 && index >= 0;
return semesters.get(index);
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

<string name="sampleStudentName">Петро Баклан</string>
<string name="sampleStudentGroup">ПТН-23</string>
<string name="date_hour_divider">\'at\'</string>

<string name="last_n_total_section">Last &amp; Total</string>
<string name="modules_section">Modules</string>
Expand All @@ -40,7 +41,6 @@
<string name="incorrect_message_message">Не вірний логін/пароль.</string>
<string name="user_agent">Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.45 Safari/537.36</string>
<string name="last_synchronized_time">Last synced with mod.tanet</string>
<string name="surprise_message">Surprise!</string>
<string name="app_version_hint">App version</string>
<string name="notification_new_score_available_title_text">New score available!</string>
<string name="notification_new_score_detailed_text">Open MODULE.OK to check it out!</string>
Expand Down

0 comments on commit 6c77089

Please sign in to comment.