Skip to content

Commit

Permalink
[Mobile] Fixed bug where news pages pointing at an old (404'ing) loca…
Browse files Browse the repository at this point in the history
…tion. Also fixed related bug where news pages were cached and displaying stale information.

[Mobile] Added auto-linking in StatusCardView to facilitate linking to the luas.ie website during outages.
[Mobile] Fixed Gaeilge translation and added Marcas Ó Duinn as a contributor to the About Activity.
[Mobile] Updated luas.ie fares URL.
[Trivial] Bumped version numbers for release v0.112.
  • Loading branch information
thecosmicfrog committed Nov 6, 2018
1 parent eb9c15e commit f35fa8c
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 29 deletions.
4 changes: 2 additions & 2 deletions mobile/build.gradle
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "org.thecosmicfrog.luasataglance" applicationId "org.thecosmicfrog.luasataglance"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 27 targetSdkVersion 27
versionCode 111 versionCode 112
versionName "0.111" versionName "0.112"
} }
buildTypes { buildTypes {
release { release {
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.webkit.WebSettings;
import android.webkit.WebView; import android.webkit.WebView;
import android.webkit.WebViewClient; import android.webkit.WebViewClient;


Expand All @@ -40,8 +41,8 @@ public class NewsActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);


final String URL_NEWS = "http://m.luas.ie/news/"; final String URL_NEWS = "https://luas.ie/news/";
final String URL_TRAVEL_UPDATES = "http://m.luas.ie/travel-updates.html"; final String URL_TRAVEL_UPDATES = "https://luas.ie/travel-updates/";


setContentView(R.layout.activity_news); setContentView(R.layout.activity_news);


Expand Down Expand Up @@ -70,8 +71,11 @@ protected void onCreate(Bundle savedInstanceState) {
/* /*
* Create a new WebView and explicitly set the WebViewClient. Otherwise, an external * Create a new WebView and explicitly set the WebViewClient. Otherwise, an external
* browser is liable to open. * browser is liable to open.
* Ensure the information is fresh by using no app or web browser cache.
*/ */
WebView webViewNews = (WebView) findViewById(R.id.webview_news); WebView webViewNews = (WebView) findViewById(R.id.webview_news);
webViewNews.getSettings().setAppCacheEnabled(false);
webViewNews.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
webViewNews.setWebViewClient(new WebViewClient()); webViewNews.setWebViewClient(new WebViewClient());


/* /*
Expand Down
10 changes: 6 additions & 4 deletions mobile/src/main/res/layout/cardview_status.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<merge <merge
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"


xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">


Expand All @@ -41,14 +42,15 @@


<TextView <TextView
android:id="@+id/textview_status" android:id="@+id/textview_status"
android:text="@string/message"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
android:gravity="center_horizontal"
android:textSize="16sp"
android:ellipsize="none" android:ellipsize="none"
android:gravity="center_horizontal"
android:maxLines="30" android:maxLines="30"
android:scrollHorizontally="false" /> android:scrollHorizontally="false"
android:autoLink="all"
android:text="@string/message"
android:textSize="16sp" />
</LinearLayout> </LinearLayout>
</merge> </merge>
5 changes: 3 additions & 2 deletions mobile/src/main/res/values-ga/strings.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</string> </string>
<string name="inbound">Bealach Isteach</string> <string name="inbound">Bealach Isteach</string>
<string name="outbound">Bealach Amach</string> <string name="outbound">Bealach Amach</string>
<string name="due">AM</string> <string name="due">ANN</string>
<string name="min">nóim</string> <string name="min">nóim</string>
<string name="mins">nóim</string> <string name="mins">nóim</string>
<string name="no_trams_forecast"><b>Tram ar bith geallta</b></string> <string name="no_trams_forecast"><b>Tram ar bith geallta</b></string>
Expand Down Expand Up @@ -103,7 +103,8 @@
</string> </string>
<string name="about_source_bugs_features">github.com/thecosmicfrog/luasataglance</string> <string name="about_source_bugs_features">github.com/thecosmicfrog/luasataglance</string>
<string name="about_developed_by">Cruthaithe ag Aaron Hastings (thecosmicfrog)</string> <string name="about_developed_by">Cruthaithe ag Aaron Hastings (thecosmicfrog)</string>
<string name="about_irish_translations">Aistriúcháin Gaeilge le Feidhlim Seoighe</string> <string name="about_irish_translations">Aistriúcháin Gaeilge le Feidhlim Seoighe agus Marcas Ó
Duinn</string>


<!-- <!--
Fares Fares
Expand Down
28 changes: 14 additions & 14 deletions mobile/src/main/res/values/strings.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
App App
--> -->
<string name="app_name">Luas at a Glance</string> <string name="app_name">Luas at a Glance</string>
<string name="version_code" translatable="false">111</string> <string name="version_code" translatable="false">112</string>
<string name="version_name" translatable="false">0.111</string> <string name="version_name" translatable="false">0.112</string>


<!-- <!--
Activities Activities
Expand Down Expand Up @@ -103,7 +103,8 @@
<string name="about_title_source_bugs_features">Source code, bugs and feature requests</string> <string name="about_title_source_bugs_features">Source code, bugs and feature requests</string>
<string name="about_source_bugs_features">github.com/thecosmicfrog/luasataglance</string> <string name="about_source_bugs_features">github.com/thecosmicfrog/luasataglance</string>
<string name="about_developed_by">Developed by Aaron Hastings (thecosmicfrog)</string> <string name="about_developed_by">Developed by Aaron Hastings (thecosmicfrog)</string>
<string name="about_irish_translations">Irish translations by Feidhlim Seoighe</string> <string name="about_irish_translations">Irish translations by Feidhlim Seoighe and Marcas Ó
Duinn</string>


<!-- <!--
Fares Fares
Expand All @@ -112,7 +113,8 @@
<b>Origin</b>, <b>Destination</b> and the number of <b>Adults</b> and <b>Children</b> who <b>Origin</b>, <b>Destination</b> and the number of <b>Adults</b> and <b>Children</b> who
will be travelling.</string> will be travelling.</string>
<string name="fares_note"><b>Note:</b> Actual fares may differ. See <string name="fares_note"><b>Note:</b> Actual fares may differ. See
<a href="http://www.luas.ie">www.luas.ie</a> for full fare details and ticket options. <a href="https://luas.ie/ticket-types.html">luas.ie</a> for full fare details and ticket
options.
</string> </string>
<string name="fares_offpeak">Single Off-Peak</string> <string name="fares_offpeak">Single Off-Peak</string>
<string name="fares_peak">Single Peak</string> <string name="fares_peak">Single Peak</string>
Expand Down Expand Up @@ -161,21 +163,19 @@
<!-- <!--
What's New What's New
--> -->
<string name="whatsnew_title_current" translatable="false">Version 0.111 (1st October 2018) <string name="whatsnew_title_current" translatable="false">Version 0.112 (10th October 2018)
</string> </string>
<string name="whatsnew_content_current" translatable="false">\u2022 [IMPROVED] Improved <string name="whatsnew_content_current" translatable="false">\u2022 [FIXED] Fixed 404 error
which occurred when tapping the <b>Alerts</b> button for some users. Many thanks to the user
who reported this issue to my email!
</string>
<string name="whatsnew_title_previous" translatable="false">Version 0.111 (1st October 2018)
</string>
<string name="whatsnew_content_previous" translatable="false">\u2022 [IMPROVED] Improved
handling of Android battery saving modes when scheduling a tram notification.\n\u2022 handling of Android battery saving modes when scheduling a tram notification.\n\u2022
[FIXED] Fixes and general improvements to Irish translations, courtesy of a user [FIXED] Fixes and general improvements to Irish translations, courtesy of a user
contribution via GitHub. contribution via GitHub.
</string> </string>
<string name="whatsnew_title_previous" translatable="false">Version 0.110 (18th June 2018)
</string>
<string name="whatsnew_content_previous" translatable="false">\u2022 [FIXED] Fixed bug where stop
forecast would not display on Wear OS (Android Wear) devices. Thanks to everyone who
reported this!\nIf you have a Wear OS smartwatch, you can install Luas at a Glance from the
Play Store on your watch.\n\u2022 [FIXED] Fixed app crash on device boot. Only affected
Android 8.0 (Oreo) and above.
</string>


<!-- <!--
Widget Widget
Expand Down
6 changes: 3 additions & 3 deletions wear/build.gradle
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.thecosmicfrog.luasataglance" applicationId "org.thecosmicfrog.luasataglance"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 27 targetSdkVersion 27
versionCode 11100 versionCode 11200
versionName "0.111" versionName "0.112"
} }
buildTypes { buildTypes {
release { release {
Expand All @@ -23,7 +23,7 @@ android {
productFlavors { productFlavors {
wear2 { wear2 {
minSdkVersion 25 minSdkVersion 25
versionCode 11101 versionCode 11201
} }
} }
} }
Expand Down
4 changes: 2 additions & 2 deletions wear/src/main/res/values/strings.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
App App
--> -->
<string name="app_name">Luas at a Glance</string> <string name="app_name">Luas at a Glance</string>
<string name="version_code" translatable="false">111</string> <string name="version_code" translatable="false">112</string>
<string name="version_name" translatable="false">0.111</string> <string name="version_name" translatable="false">0.112</string>


<!-- <!--
Activities Activities
Expand Down

0 comments on commit f35fa8c

Please sign in to comment.