@WorkerThread
    static LogResult editLogTaskLogic(final Geocache cache, final LogEntry oldEntry, final LogEntry newEntry, final Consumer<String> progress) {
        final ILoggingManager loggingManager = cache.getLoggingManager();
        final IConnector cacheConnector = loggingManager.getConnector();

        //Upload changed log entry itself
        progress.accept(LocalizationUtils.getString(R.string.log_posting_log));
        final LogResult result = cache.getLoggingManager().editLog(newEntry);
        if (!result.isOk()) {
            return result;
        }

        //Upload images
        final ImmutableTriple<ImageResult, List<Image>, Runnable> imgResult = updateImages(loggingManager, newEntry.serviceLogId, oldEntry.logImages, newEntry.logImages, progress);
        if (!imgResult.left.isOk()) {
            return LogResult.error(imgResult.left.getStatusCode(), imgResult.left.getPostServerMessage(), null);
        }

        progress.accept(LocalizationUtils.getString(R.string.log_posting_save_internal));

        //adapt logs in database
        final LogEntry adaptedNewLogEntry = applyCommonsToOwnLog(newEntry.buildUpon(), cacheConnector)
            .setLogImages(imgResult.middle)
            .build();
        changeLogsInDatabase(cache, logs -> {
            final ListIterator<LogEntry> it = logs.listIterator();
            while (it.hasNext()) {
                final LogEntry log = it.next();
                if (Objects.requireNonNull(adaptedNewLogEntry.serviceLogId).equals(log.serviceLogId)) {
                    it.set(adaptedNewLogEntry.buildUpon()
                        .setAuthor(log.author)
                        .build());
                    break;
                }
            }
        });
        //adapt commons in database
        adaptCacheCommonsAfterLogging(cache, loggingManager, oldEntry, adaptedNewLogEntry);
        // adapt cache facvorite status and stored favorite points
        if (loggingManager.supportsLogWithFavorite() && newEntry instanceof OfflineLogEntry) {
            final boolean oldWasFavorite = cache.isFavorite();
            final boolean isFavorite = ((OfflineLogEntry) newEntry).favorite;
            if (oldWasFavorite != isFavorite) {
                cache.setFavorite(isFavorite);
                cache.setFavoritePoints(cache.getFavoritePoints() + (isFavorite ? 1 : -1));
            }
        }
        //store
        DataStore.saveChangedCache(cache);

        //Cleanup
        imgResult.right.run();

        cache.notifyChange();

        return result;

    }
get title for a log image in the list
main/src/main/java/cgeo/geocaching/log/LogUtils.java