Fix ssb draft discard.
This commit is contained in:
		| @@ -1,5 +1,5 @@ | ||||
| { | ||||
| 	"type": "tildefriends-app", | ||||
| 	"emoji": "🐌", | ||||
| 	"previous": "&n79T1PqC7BjDlQsKdVx2ghkjJVfYfq8uWrK0aoeL+qM=.sha256" | ||||
| 	"previous": "&xyYP2KwKbv0fouic/uYj0WTA8jN0fAkQhPBJlLhnvK8=.sha256" | ||||
| } | ||||
|   | ||||
| @@ -233,11 +233,6 @@ class TfComposeElement extends LitElement { | ||||
| 	} | ||||
|  | ||||
| 	discard() { | ||||
| 		let edit = this.renderRoot.getElementById('edit'); | ||||
| 		edit.innerText = ''; | ||||
| 		this.input(); | ||||
| 		let preview = this.renderRoot.getElementById('preview'); | ||||
| 		preview.innerHTML = ''; | ||||
| 		this.notify(undefined); | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -84,7 +84,6 @@ class TfTabNewsElement extends LitElement { | ||||
| 		} else { | ||||
| 			delete this.drafts[id]; | ||||
| 		} | ||||
| 		/* Only trigger a re-render if we're creating a new draft or discarding an old one. */ | ||||
| 		this.drafts = Object.assign({}, this.drafts); | ||||
| 		tfrpc.rpc.localStorageSet('drafts', JSON.stringify(this.drafts)); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user