Skip to content

Commit

Permalink
ShareInto:: reset modTime after writing, so it's correctly reloaded a…
Browse files Browse the repository at this point in the history
…t time of opening at editor, by @gsantner

potential fix for #1482 #1483
  • Loading branch information
gsantner committed Nov 4, 2021
1 parent 7541863 commit 3d9540e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ public void showTextEditor(@Nullable Document document, @Nullable File file, boo

if (!sameDocumentRequested) {
if (document != null) {
document.resetModTime();
showFragment(DocumentEditFragment.newInstance(document).setPreviewFlag(preview));
} else {
showFragment(DocumentEditFragment.newInstance(file, fileIsFolder, fileLineNumber).setPreviewFlag(preview));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ private void appendToExistingDocument(final File file, final String separator, f
String trimmedContent = document.loadContent(context).trim();
String currentContent = TextUtils.isEmpty(trimmedContent) ? "" : (trimmedContent + "\n");
document.saveContent(context, currentContent + separator + _sharedText);
document.resetModTime();

if (showEditor) {
showInDocumentActivity(document);
Expand Down

0 comments on commit 3d9540e

Please sign in to comment.