Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2021-01-05 15:19:47 +0300
committerStefan Niedermann <info@niedermann.it>2021-01-05 15:19:47 +0300
commit32a1b396769670d4e47b8d5778c3657a3b9d7866 (patch)
tree44a55589f345f967e6dfe7bb99ccb80baafc1345
parenta9f2eb55f318a31e38e2a219838e2d8c1b5a384f (diff)
Enhance logging
-rw-r--r--app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java
index c08e8109..0cdd4d40 100644
--- a/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java
+++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java
@@ -106,14 +106,13 @@ public class NotePreviewFragment extends SearchableBaseNoteFragment implements O
binding.singleNoteContent.registerOnLinkClickCallback((link) -> {
try {
final long noteLocalId = db.getLocalIdByRemoteId(this.note.getAccountId(), Long.parseLong(link));
- final Intent intent = new Intent(requireActivity().getApplicationContext(), EditNoteActivity.class);
- intent.putExtra(EditNoteActivity.PARAM_NOTE_ID, noteLocalId);
- startActivity(intent);
+ Log.i(TAG, "Found note for remoteId \"" + link + "\" in account \"" + this.note.getAccountId() + "\" with localId + \"" + noteLocalId + "\". Attempt to open " + EditNoteActivity.class.getSimpleName() + " for this note.");
+ startActivity(new Intent(requireActivity().getApplicationContext(), EditNoteActivity.class).putExtra(EditNoteActivity.PARAM_NOTE_ID, noteLocalId));
return true;
} catch (NumberFormatException e) {
- Log.v(TAG, "Clicked link \"" + link + "\" is not a " + Long.class.getSimpleName() + ". Do not try to treat it as another note.");
+ // Clicked link is not a long and therefore can't be a remote id.
} catch (IllegalArgumentException e) {
- Log.i(TAG, "It looks like \"" + link + "\" might be a remote id of a note, but a note with this remote id could not be found.", e);
+ Log.i(TAG, "It looks like \"" + link + "\" might be a remote id of a note, but a note with this remote id could not be found in account \"" + note.getAccountId() + "\" .", e);
}
return false;
});