aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2015-02-16 16:38:57 +0100
committerBananeweizen <bananeweizen@gmx.de>2015-02-16 16:38:57 +0100
commit7790b559c3d3743bc6d1ac75fbcf495a5bd7fb52 (patch)
tree260add7987c13138e9db281a92f62a47cf585333 /main
parentf35ca2426bd02a18de2f83b84d2830ba05109f33 (diff)
downloadcgeo-7790b559c3d3743bc6d1ac75fbcf495a5bd7fb52.zip
cgeo-7790b559c3d3743bc6d1ac75fbcf495a5bd7fb52.tar.gz
cgeo-7790b559c3d3743bc6d1ac75fbcf495a5bd7fb52.tar.bz2
fix #4681: highlight saved log in orange
Also fixes some wrong click handlers.
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java10
-rw-r--r--main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java10
2 files changed, 9 insertions, 11 deletions
diff --git a/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java b/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java
index e52003d..076c412 100644
--- a/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java
+++ b/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java
@@ -103,11 +103,11 @@ public class CacheLogsViewCreator extends LogsViewCreator {
@Override
protected void fillViewHolder(final View convertView, final LogViewHolder holder, final LogEntry log) {
super.fillViewHolder(convertView, holder, log);
- if (null == convertView) {
- if (isOfflineLog(log)) {
- holder.author.setOnClickListener(new EditOfflineLogListener(getCache(), cacheDetailActivity));
- holder.text.setOnClickListener(new EditOfflineLogListener(getCache(), cacheDetailActivity));
- }
+ if (isOfflineLog(log)) {
+ holder.author.setOnClickListener(new EditOfflineLogListener(getCache(), cacheDetailActivity));
+ holder.text.setOnClickListener(new EditOfflineLogListener(getCache(), cacheDetailActivity));
+ holder.marker.setVisibility(View.VISIBLE);
+ holder.marker.setImageResource(R.drawable.mark_orange);
}
}
diff --git a/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java b/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java
index 3aaeec1..6715c76 100644
--- a/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java
+++ b/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java
@@ -116,12 +116,10 @@ public abstract class LogsViewCreator extends AbstractCachingListViewPageViewCre
holder.marker.setVisibility(View.GONE);
}
- if (null == convertView) {
- holder.author.setOnClickListener(createUserActionsListener());
- holder.text.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
- holder.text.setOnClickListener(new DecryptTextClickListener(holder.text));
- activity.registerForContextMenu(holder.text);
- }
+ holder.author.setOnClickListener(createUserActionsListener());
+ holder.text.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ holder.text.setOnClickListener(new DecryptTextClickListener(holder.text));
+ activity.registerForContextMenu(holder.text);
}
abstract protected UserActionsClickListener createUserActionsListener();