diff options
| author | Marco Jacob <mjacob@union06.de> | 2013-06-15 16:23:55 +0200 |
|---|---|---|
| committer | Marco Jacob <mjacob@union06.de> | 2013-06-26 18:08:20 +0200 |
| commit | fbc75936daaa3ea5e2596c0aa71593cbe9f33614 (patch) | |
| tree | 682973d51b4c1e1578e02ae8e690c88dbc74aeb1 /main/src/cgeo/geocaching/Geocache.java | |
| parent | 3d41a7c9b48fea09d6cc74cd96fa1a13b777eeb2 (diff) | |
| download | cgeo-fbc75936daaa3ea5e2596c0aa71593cbe9f33614.zip cgeo-fbc75936daaa3ea5e2596c0aa71593cbe9f33614.tar.gz cgeo-fbc75936daaa3ea5e2596c0aa71593cbe9f33614.tar.bz2 | |
make personalNote multiline again, upload button, merge on refresh
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
| -rw-r--r-- | main/src/cgeo/geocaching/Geocache.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index 1972c7a..00f1a1f 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -280,8 +280,14 @@ public class Geocache implements ICache, IWaypoint { if (elevation == null) { elevation = other.elevation; } - if (personalNote == null) { // don't use StringUtils.isBlank here. Otherwise we cannot recognize a note which was deleted on GC + // don't use StringUtils.isBlank here. Otherwise we cannot recognize a note which was deleted on GC + if (personalNote == null) { personalNote = other.personalNote; + } else if (other.personalNote != null && !personalNote.equals(other.personalNote)) { + final PersonalNote myNote = new PersonalNote(this); + final PersonalNote otherNote = new PersonalNote(other); + final PersonalNote mergedNote = myNote.mergeWith(otherNote); + personalNote = mergedNote.toString(); } if (StringUtils.isBlank(getShortDescription())) { shortdesc = other.getShortDescription(); |
