Mobile version v1

This commit is contained in:
2020-03-22 21:19:11 +01:00
parent 3072ae4387
commit 8e1ebdbd6c
9 changed files with 67 additions and 46 deletions

View File

@@ -404,14 +404,16 @@ class Editor {
this.nextId = asData.next_id;
this.thoughts[asData.id] = asData;
asData.ops.unshift({
'attributes': {'thought_time': true},
'insert': asData.created_h+"\n"
});
if(this.prevId==0 || asData.created_d != this.thoughts[this.prevId].created_d) {
asData.ops.unshift({
'attributes': {'thought_date': true},
'insert': 'Thoughts on '+asData.created_d
'insert': 'Thoughts on '+asData.created_d+"\n"
});
}
else {
asData.ops.unshift({
'attributes': {'thought_time': true},
'insert': asData.created_h+"\n"
});
}
if(!this.isEmpty()) asData.ops = this.getContent().concat(asData.ops);