aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2013-09-17 09:58:18 +0200
committerSamuel Tardieu <sam@rfc1149.net>2013-09-17 09:59:31 +0200
commit3738ad8a6b3ab4243b1f99e01d74bc67aee7af7b (patch)
treefcbfd064698e0bf2af8abf815f59eb6a6c04b013
parentb7a93cd1a6420b7d752cc409831724c35e020802 (diff)
downloadcgeo-3738ad8a6b3ab4243b1f99e01d74bc67aee7af7b.zip
cgeo-3738ad8a6b3ab4243b1f99e01d74bc67aee7af7b.tar.gz
cgeo-3738ad8a6b3ab4243b1f99e01d74bc67aee7af7b.tar.bz2
fix #3234: trackable in hands of cacher problems
-rw-r--r--main/src/cgeo/geocaching/TrackableActivity.java5
-rw-r--r--main/src/cgeo/geocaching/ui/UserNameClickListener.java18
2 files changed, 22 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/TrackableActivity.java b/main/src/cgeo/geocaching/TrackableActivity.java
index 20a9ccf..a257b8e 100644
--- a/main/src/cgeo/geocaching/TrackableActivity.java
+++ b/main/src/cgeo/geocaching/TrackableActivity.java
@@ -16,6 +16,7 @@ import cgeo.geocaching.ui.AnchorAwareLinkMovementMethod;
import cgeo.geocaching.ui.CacheDetailsCreator;
import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.UserActionsClickListener;
+import cgeo.geocaching.ui.UserNameClickListener;
import cgeo.geocaching.ui.logs.TrackableLogsViewCreator;
import cgeo.geocaching.utils.HtmlUtils;
import cgeo.geocaching.utils.Log;
@@ -422,7 +423,9 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
}
});
} else if (Trackable.SPOTTED_USER == trackable.getSpottedType()) {
- spotted.setOnClickListener(new UserActionsClickListener());
+ spotted.setOnClickListener(new UserNameClickListener(Html.fromHtml(trackable.getSpottedName()).toString()));
+ } else if (Trackable.SPOTTED_OWNER == trackable.getSpottedType()) {
+ spotted.setOnClickListener(new UserNameClickListener(Html.fromHtml(trackable.getOwner()).toString()));
}
}
diff --git a/main/src/cgeo/geocaching/ui/UserNameClickListener.java b/main/src/cgeo/geocaching/ui/UserNameClickListener.java
new file mode 100644
index 0000000..190dfde
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/UserNameClickListener.java
@@ -0,0 +1,18 @@
+package cgeo.geocaching.ui;
+
+import android.view.View;
+
+public class UserNameClickListener extends AbstractUserClickListener {
+
+ final private String name;
+
+ public UserNameClickListener(final String name) {
+ super(true);
+ this.name = name;
+ }
+
+ @Override
+ protected CharSequence getUserName(final View view) {
+ return name;
+ }
+}