commit c1b166d3f09812b70cb84208f436981380ec116d Author: Fabio Mazza Date: Wed Sep 18 14:43:43 2024 +0200 Fix not showing the stop name if in favorites diff --git a/app/src/main/java/it/reyboz/bustorino/fragments/ArrivalsFragment.java b/app/src/main/java/it/reyboz/bustorino/fragments/ArrivalsFragment.java index 6b056b0..f7b88cf 100644 --- a/app/src/main/java/it/reyboz/bustorino/fragments/ArrivalsFragment.java +++ b/app/src/main/java/it/reyboz/bustorino/fragments/ArrivalsFragment.java @@ -520,7 +520,7 @@ public class ArrivalsFragment extends ResultBaseFragment implements LoaderManage */ private void updateMessage(){ String message = null; - if (stopName != null && stopID != null && stopName.length() > 0) { + if (stopName != null && stopID != null && !stopName.isEmpty()) { message = (stopID.concat(" - ").concat(stopName)); } else if(stopID!=null) { message = stopID; @@ -572,7 +572,8 @@ public class ArrivalsFragment extends ResultBaseFragment implements LoaderManage data.moveToFirst(); final String probableName = data.getString(colUserName); stopIsInFavorites = true; - stopName = probableName; + if (probableName != null && !probableName.isEmpty()) + stopName = probableName; //set the stop //update the message in the textview updateMessage();