You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Mobile: Fixes #902: Don't change existing note when sharing with mobile app
This commit is contained in:
@ -73,8 +73,12 @@ class Note extends BaseItem {
|
||||
}
|
||||
|
||||
static defaultTitle(note) {
|
||||
if (note.body && note.body.length) {
|
||||
const lines = note.body.trim().split("\n");
|
||||
return this.defaultTitleFromBody(note.body);
|
||||
}
|
||||
|
||||
static defaultTitleFromBody(body) {
|
||||
if (body && body.length) {
|
||||
const lines = body.trim().split("\n");
|
||||
let output = lines[0].trim();
|
||||
// Remove the first #, *, etc.
|
||||
while (output.length) {
|
||||
|
Reference in New Issue
Block a user