Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Fixes for timestamp and ID display #28

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,16 @@ android {
}

repositories {
jcenter()
mavenCentral()
maven { url "http://dl.bintray.com/journeyapps/maven" }
// maven { url 'http://clinker.47deg.com/nexus/content/groups/public' }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.zxing:core:2.2'
compile 'com.journeyapps:zxing-android-embedded:2.3.0@aar'
compile 'com.journeyapps:zxing-android-integration:2.3.0@aar'
compile 'com.android.support:support-v4:24.0.0-alpha2'
compile 'com.android.support:appcompat-v7:24.0.0-alpha2'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.journeyapps:zxing-android-embedded:3.4.0'
}

allprojects {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/io/Pushjet/api/PushListAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
if (title.equals(""))
title = entries.get(position).getService().getName();
String description = entries.get(position).getMessage();
Date pushDate = entries.get(position).getLocalTimestamp();
Date pushDate = entries.get(position).getTimestamp();
Bitmap icon = entries.get(position).getService().getIconBitmapOrDefault(context);

dateText.setText(this.df.format(pushDate));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}

public Date getLocalTimestamp() {
return new Date(timestamp.getTime() + TimeZone.getDefault().getOffset(System.currentTimeMillis()));
}

public String getTitleOrName() {
String ret = title;
if (ret.equals(""))
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<string name="perf_server_use_custom">Use custom server</string>
<string name="pref_server_custom_url">Server URL</string>
<string name="pref_server_custom_sender_id">Custom Sender ID</string>
<string name="pref_server_custom_sender_default">509878466986</string>
<string name="pref_general_reset">Delete all notifications</string>
<string name="pref_server_register">Re-register with server</string>
<string name="pref_server_use_custom_summary">Advanced; for if you don\'t trust our server and/or you want to host it yourself</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/pref_server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:dependency="server_use_custom"
android:key="server_custom_sender_id"
android:title="@string/pref_server_custom_sender_id"
android:defaultValue="509878466986"
android:defaultValue="@string/pref_server_custom_sender_default"
android:selectAllOnFocus="true"
android:singleLine="true"
android:inputType="number"/>
Expand Down