private void onPostExecuteInternal(final StatusResult statusResult) {
        GeocacheChangedBroadcastReceiver.sendBroadcast(this, cache.getGeocode());
        if (statusResult.isOk()) {

            final String currentLogText = currentLogText();
            if (!StringUtils.isBlank(currentLogText)) {
                Settings.setLastCacheLog(currentLogText);
            }

            final LogContext logContext = getLogContext();
            final LogType logType = logContext.getLogEntry().logType;
            final String cacheName = logContext.getCache().getName();
            final String cacheUrl = logContext.getCache().getUrl();
            final String prefix;
            switch (logType) {
                case FOUND_IT:
                    prefix = LocalizationUtils.getString(R.string.log_share_prefix_found, cacheName, cacheUrl);
                    break;
                case DIDNT_FIND_IT:
                    prefix = LocalizationUtils.getString(R.string.log_share_prefix_dnf, cacheName, cacheUrl);
                    break;
                case NOTE:
                    prefix = LocalizationUtils.getString(R.string.log_share_prefix_note, cacheName, cacheUrl);
                    break;
                case NEEDS_MAINTENANCE:
                    prefix = LocalizationUtils.getString(R.string.log_share_prefix_maintenance, cacheName, cacheUrl);
                    break;
                case NEEDS_ARCHIVE:
                    prefix = LocalizationUtils.getString(R.string.log_share_prefix_archive, cacheName, cacheUrl);
                    break;
                default:
                    prefix = LocalizationUtils.getString(R.string.log_share_prefix_default, cacheName, cacheUrl);
                    break;
            }

            //reset Gui and all values
            resetValues();
            refreshGui();
            lastSavedState = getEntryFromView();

            imageListFragment.clearImages();
            imageListFragment.adjustImagePersistentState();

            final Intent shareIntent = new Intent();
            shareIntent.putExtra("EXTRA_SHARE_TEXT", prefix + currentLogText);
            setResult(Activity.RESULT_OK, shareIntent);

            // Prevent from saving log after it was sent successfully.
            finish(LogCacheActivity.SaveMode.SKIP);
        } else if (!LogCacheActivity.this.isFinishing()) {
            SimpleDialog.of(LogCacheActivity.this)
                    .setTitle(R.string.info_log_post_failed)
                    .setMessage(TextParam.id(R.string.info_log_post_failed_simple_reason))
                    .setButtons(R.string.info_log_post_retry, R.string.cancel, logEditMode == LogEditMode.CREATE_NEW ? R.string.info_log_post_save : 0)
                    .setNeutralAction(() -> finish(LogCacheActivity.SaveMode.FORCE))
                    .confirm(this::sendLogInternal);
        }
    }
Checks whether there are favorite points available and sets the corresponding visibility of
"add to favorite" checkbox.
main/src/main/java/cgeo/geocaching/log/LogCacheActivity.java