Skip to content

Commit

Permalink
Made message timestamps consistent with webapp timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
bradcardello committed Dec 4, 2015
1 parent e701481 commit af4caf9
Show file tree
Hide file tree
Showing 6 changed files with 279 additions and 388 deletions.
624 changes: 263 additions & 361 deletions .idea/workspace.xml

Large diffs are not rendered by default.

25 changes: 11 additions & 14 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/debug" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars" />
Expand All @@ -87,29 +85,28 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
<orderEntry type="library" exported="" name="library-1.0.4" level="project" />
<orderEntry type="library" exported="" name="design-23.1.1" level="project" />
<orderEntry type="library" exported="" name="okio-1.6.0" level="project" />
<orderEntry type="library" exported="" name="play-services-appindexing-8.1.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.5.0" level="project" />
<orderEntry type="library" exported="" name="json-simple-1.1.1" level="project" />
<orderEntry type="library" exported="" name="design-23.1.1" level="project" />
<orderEntry type="library" exported="" name="sinch-android-rtc-3.7.1" level="project" />
<orderEntry type="library" exported="" name="parseui-widget-android-0.0.1" level="project" />
<orderEntry type="library" exported="" name="bolts-android-1.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-basement-8.1.0" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-23.1.1" level="project" />
<orderEntry type="library" exported="" name="parseui-login-android-0.0.1" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
<orderEntry type="library" exported="" name="parse-android-1.10.3" level="project" />
<orderEntry type="library" exported="" name="parseui-login-android-0.0.1" level="project" />
<orderEntry type="library" exported="" name="parseui-widget-android-0.0.1" level="project" />
<orderEntry type="library" exported="" name="library-1.0.4" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
<orderEntry type="library" exported="" name="bolts-android-1.2.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.5.0" level="project" />
<orderEntry type="library" exported="" name="play-services-basement-8.1.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.6.0" level="project" />
<orderEntry type="library" exported="" name="json-simple-1.1.1" level="project" />
<orderEntry type="library" exported="" name="parse-android-1.10.3" level="project" />
<orderEntry type="library" exported="" name="org.apache.http.legacy-android-23" level="project" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,13 @@ protected void onCreate(Bundle savedInstanceState) {
// Get current user data from Parse.com
ParseUser currentUser = ParseUser.getCurrentUser();

/* Code to generate dummy course list for testing purposes
Credentials test = new Credentials();
test.addCourse("CMPS104", false);
test.addCourse("CMPS115", false);
test.addCourse("CMPE110", false);
test.sendToParse();
*/
if (currentUser != null) {
if (!currentUser.getBoolean("emailVerified")) {
Intent homeIntent = new Intent(MainActivity.this, EmailNotVerified.class);
startActivity(homeIntent);
finish();
}
else{


Intent intent = new Intent(MainActivity.this, FragmentPagerSupport.class);
startActivity(intent);
serviceIntent = new Intent(MainActivity.this, SinchService.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public void done(List<ParseObject> messageList, com.parse.ParseException e) {
if (messageList.size() == 0) {
long start = System.currentTimeMillis();
Date timeDiff = new Date(start); // compensate for 1h in millis
SimpleDateFormat timeFormat = new SimpleDateFormat("MMM d, h:mma");
SimpleDateFormat timeFormat = new SimpleDateFormat("M/d/yyyy, h:mm:s a");
String timestamp = timeFormat.format(timeDiff);
writableMessage.addHeader("Sent", timestamp);
messageAdapter.addMessage(writableMessage, MessageAdapter.DIRECTION_INCOMING);
Expand All @@ -259,7 +259,7 @@ public void done(List<ParseObject> messageList, com.parse.ParseException e) {
if (messageList.size() == 0) {
long start = System.currentTimeMillis();
Date timeDiff = new Date(start); // compensate for 1h in millis
SimpleDateFormat timeFormat = new SimpleDateFormat("MMM d, h:mma");
SimpleDateFormat timeFormat = new SimpleDateFormat("M/d/yyyy, h:mm:s a");
String timestamp = timeFormat.format(timeDiff);
writableMessage.addHeader("Sent", timestamp);

Expand Down
1 change: 1 addition & 0 deletions build/intermediates/dex-cache/cache.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<items version="2" />

4 changes: 2 additions & 2 deletions local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Tue Dec 01 15:28:57 PST 2015
sdk.dir=/home/george/Android/Sdk
#Thu Dec 03 20:49:31 PST 2015
sdk.dir=C\:\\Android\\sdk

0 comments on commit af4caf9

Please sign in to comment.